Skip to content

Chip group

Filter by a few facets with chips that morph as you pick them.

ChipsFilterToggle
npx shadcn@latest add @silicon-ui/chip-group

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/chip-group

Manually

  1. Install the dependencies

    npm install motion
  2. Copy these files into your project

    • components/silicon-ui/chip-group/chip-group.tsx
    • components/silicon-ui/chip-group/chip-group.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 { ChipGroup } from "@/components/silicon-ui/chip-group/chip-group";

API reference

PropTypeDefault
options*ChipOption[]—
value*string[]—
onValueChange*(value: string[]) => void—
label*

Accessible name of the group, such as “Topics”.

string—
multiple

Allow several chips at once. In single mode the selected chip can still be cleared.

booleantrue
maxVisible

Chips shown before the rest fold behind a “+N more” chip. Chips selected when it folds stay in view.

numberInfinity
classNamestring—

Dependencies

npm
motion
Registry
silicon-motion-tokens