Skip to content

    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.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/chip-input

    First 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

    PropTypeDefaultDescription
    labelstring"Tags"Field label.
    placeholderstring"Add a tag…"Placeholder text.
    maxnumber12Maximum number of chips.
    valueReactNode—Controlled chips (string[]), pair with onChange.
    classNamestring—Extra classes for the root element.