Native Select
The browser's own select, dressed as a Nelumbo field. It has the same surface, height, chevron and focus line as Select, but the list is drawn by the platform: the wheel on iOS, the sheet on Android, the keyboard and type-ahead you already know on desktop.
Install
npx shadcn@latest add @nelumbo/native-selectWith a label
The label is always raised, because a select always shows a value. Start with a disabled empty option as the placeholder. Filled and outlined, like Input.
Used to work out tax.
Sizes
default 56px, sm 48px, xs 36px. Without a floating label (xs, or no label) pass an aria-label or label so it has a name.
Invalid and disabled
Pick a time zone to schedule the call.
Native Select or Select?
Both look like the same field. They differ in what opens.
Native Select
- Phones and tablets: the system picker, with the right touch size and no scroll traps.
- Forms posted to a server or filled by password managers and autofill (country, state, time zone).
- Long lists such as 200 countries: type-ahead and platform scrolling for free.
- Plain text options only; the browser draws them, so no icons, descriptions or custom rows.
Select
- Desktop UIs where the list should match the rest of the design.
- Options with icons, descriptions or a check mark on the chosen row.
- Short lists where the spring animation and the raised pill feel good.
- When you need to control the list's width, position or contents.
Usage
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "@/components/ui/native-select"// shadcn's API, unchanged<NativeSelect> <NativeSelectOption value="">Select status</NativeSelectOption> <NativeSelectOption value="todo">Todo</NativeSelectOption></NativeSelect>// Nelumbo: floating label, help and error text<NativeSelect label="Country" description="Used for tax." defaultValue=""> <NativeSelectOption value="" disabled>Choose a country</NativeSelectOption> <NativeSelectOptGroup label="Europe"> <NativeSelectOption value="de">Germany</NativeSelectOption> </NativeSelectOptGroup></NativeSelect>Props
| Prop | Type | Default | Notes |
|---|---|---|---|
label | string | Floating label (always raised). Names the control; sr-only at size xs | |
variant | "filled" | "outlined" | "filled" | Same as Input |
size | "default" | "sm" | "xs" | "default" | 56px, 48px, 36px. shadcn's sm still means smaller |
icon | IconName | Leading Material Symbol | |
description | ReactNode | Help text under the field | |
error | ReactNode | boolean | Marks invalid; a string replaces the description | |
className | string | On the field wrapper (set the width here) | |
...props | select props | value, defaultValue, onChange, name, required, aria-*; ref points at the select |