Skip to Content
zjkm-ui
Components

Chip Select

Pick several options as chips.

Topics
Props
<ChipSelect label="Topics" options={topics} />

Installation

npx shadcn@latest add https://ui.zjkm.tech/r/chip-select.json
import { 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

PropTypeDefaultDescription
labelstringNames the group.
optionsstring[]The choices.
defaultValuestring[][]Chosen at the start.
onChange(value: string[]) => voidCalled with every change.
classNamestringClasses for the wrapper.

It has no animation, so reduced motion changes nothing.

On this page