Select
A compact choice field with a keyboard friendly menu.
A select whose trigger grows into the list, with a gliding highlight and type-ahead.
npx shadcn@latest add @silicon-ui/morph-selectnpx shadcn@latest add @silicon-ui/morph-selectInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/morph-select/morph-select.tsxcomponents/silicon-ui/morph-select/morph-select.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
label*Visible label, also the accessible name of the trigger and the list. | string | — |
items* | MorphSelectItem[] | — |
hideLabelKeeps the label for assistive technology only. | boolean | false |
value | string | null | — |
defaultValue | string | null | null |
onValueChange | (value: string, option: MorphSelectOption) => void | — |
placeholder | string | "Select" |
searchableShows a search field in place of the trigger when open. "auto" turns it on above eight options. | boolean | "auto" | "auto" |
searchPlaceholder | string | — |
panelWidthWidth of the open surface in px. It never gets narrower than the trigger. Defaults to 272. | number | 272 |
maxListHeightTallest the option list gets before it scrolls, in px. Defaults to 296. | number | 296 |
alignWhich edge of the trigger stays put while the surface grows. | "start" | "end" | "start" |
nameAdds a hidden input for native form submission. | string | — |
disabled | boolean | false |
className | string | — |