Tag Input
A field that turns typed text into removable tags. Type a value, press Enter, and keep going.
2 topics
Installation
Copy the command below and run it in your terminal.
Usage
Bind tags for the tag list. Compose List for the tokens and Input for entry inside Root.
Examples
Read changes through callbacks, guard the list with validation, and cap it with a maximum.
Responding to changes
onAdd and onRemove report single-tag edits; onTagsChange reports the whole list.
Validation
Return false or an error message from validate to reject a tag. Rejections arrive through onReject with a human-readable reason.
Anatomy
TagInput.Root - Owns tags and draft entry state.
TagInput.List - Groups the entered tags.
TagInput.Tag - Renders one tag with its remove control.
TagInput.Input - Accepts new tag text.
bunx @sivir-ui/svelte add tag-input