crucıble

Roster

A tag / multi-select input over a real <input>. Type and press Enter or comma to pop in a removable chip; an optional suggestion pool filters as you type into a keyboard-navigable listbox, with a duplicate guard and a live-region announcing every add and remove. Backspace on an empty field peels the last chip; chips are focusable and removable with Delete. Neutral with one cool accent; reduced motion adds and removes instantly.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/roster

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
valuestring[]Controlled list of tags. Omit for uncontrolled use (see defaultValue).
defaultValuestring[][]Initial tags when uncontrolled.
onChange(tags: string[]) => voidFires whenever the tag set changes, with the tags in order.
suggestionsstring[][]Optional suggestion pool, filtered against the query as you type. Selecting one (click / Enter on the highlighted option) adds it.
maxnumberundefined — no limitMaximum number of tags. Adds are refused (and announced) at the cap.
placeholderstring"Add tags…"Placeholder shown in the empty input.
caseSensitivebooleanfalseCase-insensitive duplicate guard when false — "React" and "react" collide.
labelstring"Tags"Accessible name for the field.
accentstringskyThe single cool accent for focus ring, chips, and highlighted options.
disabledbooleanfalseDisable the whole control.
pausedbooleanfalseFreeze the chip pop / removal motion (static resting pose).
classNamestring

Honors prefers-reduced-motion with a designed static fallback, and passes className through.