- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- 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
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/select.json
Usage
import { createListCollection } from "@ark-ui/react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select";
const collection = createListCollection({ items: ["Option 1", "Option 2", "Option 3"], }); <Select collection={collection}> <SelectTrigger> <SelectValue placeholder="Select an option" /> </SelectTrigger> <SelectContent> {collection.items.map((item) => ( <SelectItem item={item} key={item}> {item} </SelectItem> ))} </SelectContent> </Select>
Controlled
Use value and onValueChange to control the selected items.
Size
Control trigger size with the size prop on SelectTrigger.
Small
Medium
Large
State
Disabled
Invalid
Examples
Multiple
Enable multiple selection with the multiple prop.
Grouping
Organize options into groups using groupBy and SelectGroup.
With Field
Use <Field /> for labels, helper text, and error handling.
Used for shipping estimates
Max Selection
With Scroll
Empty
Use SelectEmpty to display a message when the collection has no items.
API Reference
Select
Root component. Wraps Ark UI Select.Root with HiddenSelect for form support.
| Prop | Type | Default |
|---|---|---|
collection | ListCollection<T> | - |
value | string[] | - |
defaultValue | string[] | - |
onValueChange | (details: ValueChangeDetails<T>) => void | - |
multiple | boolean | false |
disabled | boolean | - |
invalid | boolean | - |
name | string | - |
required | boolean | - |
positioning | PositioningOptions | - |
lazyMount | boolean | true |
unmountOnExit | boolean | true |
className | string | - |
SelectTrigger
Opens the dropdown on click. Displays the selected value or placeholder.
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "md" |
showClearTrigger | boolean | false |
className | string | - |
asChild | boolean | - |
SelectValue
Shows the selected value or placeholder. Use SelectContext as children for custom display.
| Prop | Type | Default |
|---|---|---|
placeholder | string | - |
className | string | - |
asChild | boolean | - |
SelectContent
Holds the dropdown options. Displayed in a portal.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
SelectClearTrigger
Button to clear the selected value. Shown when showClearTrigger is true on SelectTrigger.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
SelectGroup
Groups related options under an optional heading.
| Prop | Type | Default |
|---|---|---|
heading | string | ReactNode | - |
className | string | - |
asChild | boolean | - |
SelectGroupLabel
Label for an option group.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
SelectItem
A single selectable option in the dropdown.
| Prop | Type | Default |
|---|---|---|
item | T | - |
className | string | - |
asChild | boolean | - |
SelectEmpty
Shown when the collection has no items (collection.size === 0). Place inside SelectContent.
| Prop | Type | Default |
|---|---|---|
className | string | - |
children | ReactNode | - |
For a complete list of props, see the Ark UI documentation.