Installation
npx shadcn@latest add @iconiq/selectProps
Option shape
3 props
Each selectable row is described by a plain object and rendered inside a portaled menu.
value
stringRequired
Stable identifier used to determine the selected option and what onChange returns.
label
stringRequired
Text shown in both the trigger and the dropdown row.
icon
ReactNodeOptional leading visual shown only inside the dropdown row.
Select
5 props
Animated single-select dropdown that manages open state internally but expects the selected value to come from the parent.
options
{ value: string; label: string; icon?: ReactNode }[]Required
Rows available in the dropdown menu.
value
stringCurrently selected option value. The component derives its selected label entirely from this prop.
onChange
(value: string) => voidCalled when a row is chosen. The menu closes immediately afterward.
placeholder
stringDefault
Select an option…Fallback trigger text shown when no option matches the current value.
className
stringMerged onto the outer wrapper so width and placement can be adjusted without editing the component source.
Notes
This implementation is effectively controlled for selection. If you call onChange without updating value, the visible selection and checkmark do not move.
The public API still does not expose disabled or native form props.