Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Native Select
Styled native HTML select element.
For a styled select component, use the Select component.
Installation#
pnpm dlx shadcn@latest add @shark/native-select
Anatomy#
NativeSelect ├── NativeSelectOption └── NativeSelectOptGroup └── NativeSelectOption
Usage#
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption, } from "@/components/ui/native-select";
<NativeSelect> <NativeSelectOptGroup label="Group 1"> <NativeSelectOption value="1">Option 1</NativeSelectOption> <NativeSelectOption value="2">Option 2</NativeSelectOption> <NativeSelectOption value="3">Option 3</NativeSelectOption> </NativeSelectOptGroup> </NativeSelect>
Native Select vs Select#
- NativeSelect — Use for native browser behavior, better performance, or mobile-optimized dropdowns.
- Select — Use for custom styling, animations, or complex interactions.
Sizes#
Use the size prop to change the select height.
Small#
Medium#
Large#
States#
Controlled#
Use value and onChange to control the select externally.
Selected: —
Disabled#
Use the disabled prop to disable the select.
Invalid#
Use the invalid prop to mark the select as invalid.
Examples#
Groups#
Use NativeSelectOptGroup to group options with a label.
With Field#
Wrap in Field with FieldLabel and FieldDescription for proper labeling and accessibility.
Used for shipping estimates
API Reference#
NativeSelect#
Extends native <select> props. Additional props:
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "md" |
disabled | boolean | - |
invalid | boolean | - |
NativeSelectOptGroup#
Extends native <optgroup> props. Use label for the group label.
NativeSelectOption#
Extends native <option> props. Use value and children for option value and label.
For a complete list of props, see the Ark UI documentation.