Skip to content

Tag / TagGroup

Two components: TagGroup (the container) and Tag (individual chips). Built on React Aria’s TagGroup and Tag primitives with keyboard navigation and ARIA group labelling.

Terminal window
npx @a2ra/cli add tag
{
"type": "TagGroup",
"props": {
"label": "Filter by status",
"selectionMode": "multiple"
},
"children": [
{ "type": "Tag", "props": { "id": "active" }, "children": "Active" },
{ "type": "Tag", "props": { "id": "pending" }, "children": "Pending" },
{ "type": "Tag", "props": { "id": "archived" }, "children": "Archived" }
]
}
PropTypeDescription
labelstringVisible group label
selectionModenone default
single
multiple
Selection behaviour
descriptionstringHelper text shown below the group
childrennode[]Tag child nodes
PropTypeDescription
idstringUnique identifier for selection tracking
isDisabledtrue
false default
Disables this tag
childrenstringTag label text
  • selectionMode: "none" (default) renders tags as static labels.
  • With selectionMode: "single" or "multiple", tags become interactive toggle buttons.
  • Arrow keys navigate between tags; Space or Enter selects the focused tag.