Skip to content

Tag input

Turn short text values into removable tags.

FieldTags
npx shadcn@latest add @silicon-ui/tag-input

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/tag-input

Manually

  1. Install the dependencies

    npm install lucide-react motion
  2. Copy these files into your project

    • components/silicon-ui/tag-input/tag-input.tsx
    • components/silicon-ui/tag-input/tag-input.module.css
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { TagInput } from "@/components/silicon-ui/tag-input/tag-input";

API reference

PropTypeDefault
label*string—
valuestring[]—
defaultValuestring[][]
onValueChange(value: string[]) => void—
placeholderstring"Add a tag"
descriptionstring—
idstring—

Dependencies

npm
lucide-reactmotion
Registry
silicon-motion-tokens