Select
A compact choice field with a keyboard friendly menu.
Filter by a few facets with chips that morph as you pick them.
npx shadcn@latest add @silicon-ui/chip-groupnpx shadcn@latest add @silicon-ui/chip-groupInstall the dependencies.
npm install motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/chip-group/chip-group.tsxcomponents/silicon-ui/chip-group/chip-group.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
options* | ChipOption[] | — |
value* | string[] | — |
onValueChange* | (value: string[]) => void | — |
label*Accessible name of the group, such as “Topics”. | string | — |
multipleAllow several chips at once. In single mode the selected chip can still be cleared. | boolean | true |
maxVisibleChips shown before the rest fold behind a “+N more” chip. Chips selected when it folds stay in view. | number | Infinity |
className | string | — |