Multi-select
Select several values while keeping the field readable.
npx shadcn@latest add @silicon-ui/multi-selectInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/multi-selectManually
Install the dependencies
npm install lucide-react motionCopy these files into your project
- components/silicon-ui/multi-select/multi-select.tsx
- components/silicon-ui/multi-select/multi-select.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/lib/fluid-hover.tsx
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
label* | string | — |
options* | MultiSelectOption[] | — |
value | string[] | — |
defaultValue | string[] | [] |
onValueChange | (value: string[]) => void | — |
placeholder | string | "Select options" |
description | string | — |
maxVisible | number | 2 |
disabled | boolean | false |
className | string | — |
Dependencies
- npm
- lucide-reactmotion
- Registry
- silicon-motion-tokens