# Tag input

Free-form values entered as removable tags.

Import from `@a31labs/rax/tag-input`.

## Usage

```tsx
<Field label="Labels"><TagInput value={tags} onValueChange={setTags} max={5} /></Field>
```

## Rules

Props: `value` (`string[]`), `onValueChange`, `max`, `validate`, `placeholder`, `suggestions` (native datalist), `mono`, plus native input props (they go to the text input, so it works inside Field). Looks like Input: `edge` outline, focus ring on the whole box, wraps onto more lines. Chips are surface-3 with a 24px "Remove <tag>" button. Enter or comma adds a tag, Backspace in an empty field removes the last one, and leaving the field adds the pending text. Tags are trimmed; blanks and duplicates (ignoring case) are rejected. A `validate` or `max` error shows inline in danger-ink with the danger glyph, sets `aria-invalid`, and keeps the text so the user can fix it.

Page: https://rax.a31.at/components/tag-input
