Browse components
Chip Input
A tag field where Enter or a comma pops text into a chip, the others slide aside when one leaves, a duplicate shakes the existing chip, and Backspace marks then removes the last one.
Installation
npx shadcn@latest add @glint-ui/chip-inputFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/chip-input.json
Usage
import { ChipInput } from "@/components/ui/chip-input";
<ChipInput value={tags} onChange={setTags} max={8} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | "Tags" | Field label. |
| placeholder | string | "Add a tag…" | Placeholder text. |
| max | number | 12 | Maximum number of chips. |
| value | ReactNode | — | Controlled chips (string[]), pair with onChange. |
| className | string | — | Extra classes for the root element. |