Tags Input
A list of short values, where invalid entries stay visible instead of vanishing.
- Forms
- 1 file
- No extra npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add tags-inputNo npm packages are needed beyond what Dowel already requires.
import { TagsInput } from "@/components/ui/tags-input";Default
With Tags
Invalid Stays Visible
Paste Multiple
At The Limit
Allowed Domains
Disabled
Animated Tags
<TagsInput>
| Prop | Type | Default |
|---|---|---|
label (required)Names the field. Required — an unlabelled list of tokens is unreadable. | string | — |
onValueChange (required) | (tags: string[]) => void | — |
value (required) | string[] | — |
allowDuplicatesRejects a tag already present. Rejections are announced, never silent. | boolean | false |
animateExitLets a removed tag blur and drop away before it leaves the DOM. The departing copy is | boolean | false |
delimitersCharacters that commit the token being typed, besides Enter. | string[] | [",", ";"] |
disabled | boolean | false |
inputProps | Omit<ComponentPropsWithRef<"input">, "value" | "onChange" | "disabled"> | — |
maxRefuses further tags once reached, and says so. | number | — |
placeholder | string | — |
validateDecides whether a tag is acceptable. An invalid tag is still added, marked, and given its reason, rather than being refused or dropped. | TagValidator | — |
Plus every attribute of <div> except onChange, children.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes