Components
Chip Select
Pick several options as chips.
Topics
<ChipSelect label="Topics" options={topics} />Installation
npx shadcn@latest add https://ui.zjkm.tech/r/chip-select.jsonimport { ChipSelect } from "@/components/chip-select"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
Pick several options at once as chips. Each chip is a real checkbox in a named group, so Tab moves between chips and Space toggles one.
import { ChipSelect } from "@/components/chip-select";
export function Topics() {
return <ChipSelect label="Topics" options={["AI", "Design", "Performance"]} onChange={(v) => console.log(v)} />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | Names the group. | |
options | string[] | The choices. | |
defaultValue | string[] | [] | Chosen at the start. |
onChange | (value: string[]) => void | Called with every change. | |
className | string | Classes for the wrapper. |
It has no animation, so reduced motion changes nothing.