Skip to content

✨ feat: add TagsInput component - #732

Open
futjesus wants to merge 1 commit into
mainfrom
feat/tags-input
Open

futjesus wants to merge 1 commit into
mainfrom
feat/tags-input

Conversation

@futjesus

@futjesus futjesus commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Compute (TagsInput) and vpc (ChipsInput) each built a free-text tags field because TagSelect only selects from a fixed list and exposes no label, error or helper text.

  • TagsInput (new): controlled value: string[] / onChange. Enter or comma (delimiters) adds the trimmed, de-duplicated tag; Backspace on an empty field removes the last one; each tag is a dismissible Badge. The pending text is committed on blur (commitOnBlur). suggestions shows the unselected matches in a listbox with ArrowUp/ArrowDown/Enter/Escape and mouse selection; isLoading shows a spinner and a loading row. Mirrors the Input API: label, isRequired, labelAction, error, helperText, aria-invalid / aria-describedby, disabled.
  • Exported from the package root.

Test plan

  • New tests: add with Enter/comma (trim + dedupe), remove with Backspace and badge, filtered suggestions + keyboard select, mouse select, commit on blur, commitOnBlur=false, error/helper description, loading + disabled, axe
  • npx vitest run lib/components/TagsInput, lint, types, prettier
  • Storybook: TagsInput

Compute (TagsInput) and vpc (ChipsInput) each built a free-text tags
field because TagSelect only picks from a fixed list and has no label,
error or helper text. TagsInput mirrors the Input API (label, isRequired,
error, helperText, labelAction), adds tags on Enter or comma, removes the
last one with Backspace on an empty field, commits the pending text on
blur, and offers `suggestions` in a keyboard-navigable listbox with a
loading state.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant