Tag input
Turn short text values into removable tags.
npx shadcn@latest add @silicon-ui/tag-inputInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/tag-inputManually
Install the dependencies
npm install lucide-react motionCopy these files into your project
- components/silicon-ui/tag-input/tag-input.tsx
- components/silicon-ui/tag-input/tag-input.module.css
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 | — |
value | string[] | — |
defaultValue | string[] | [] |
onValueChange | (value: string[]) => void | — |
placeholder | string | "Add a tag" |
description | string | — |
id | string | — |
Dependencies
- npm
- lucide-reactmotion
- Registry
- silicon-motion-tokens