Native Select
A styled native select with grouped options, placeholder graying, listbox mode, invalid and disabled states, and RTL — the OS picker on mobile, zero JavaScript.
Installation#
pnpm dlx shadcn@latest add @davinciui/native-selectUsage#
Composition
A styled native select with an overlaid chevron — the OS picker on mobile, zero JavaScript for the popup. Group options with NativeSelectGroup and flag placeholder options disabled + hidden.
API Reference#
| Prop | Type | Default |
|---|---|---|
invalidError state with destructive ring. Also honors aria-invalid. | boolean | false |
requiredNative required — grays the placeholder until a value is picked. | boolean | false |
multipleListbox mode. Stretches to fit; the chevron hides itself. | boolean | false |
NativeSelectGroupLabeled option group; supports native disabled. | optgroup element | — |
NativeSelectOptionOption with native disabled + hidden placeholder support. | option element | — |
classNameExtra classes for the wrapper. Constrain width with max-w-*. | string | — |
Accessibility#
Renders a native select, so keyboard behavior and the OS picker come from the browser. aria-invalid is set for the invalid prop, and the chevron is aria-hidden. There is no built-in label; consumers must supply one.
Motion#
Only CSS state transitions animate: border, shadow, and background colours over 150ms ease-out, plus the chevron colour. motion-reduce disables them. There is no JavaScript motion or timing prop.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

