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.
Add via CLI
Section titled “Add via CLI”npx @a2ra/cli add tagRead-only tags
Section titled “Read-only tags”Selectable tags
Section titled “Selectable tags”Example JSON
Section titled “Example JSON”{ "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" } ]}TagGroup props
Section titled “TagGroup props”| Prop | Type | Description |
|---|---|---|
label | string | Visible group label |
selectionMode | none defaultsinglemultiple | Selection behaviour |
description | string | Helper text shown below the group |
children | node[] | Tag child nodes |
Tag props
Section titled “Tag props”| Prop | Type | Description |
|---|---|---|
id | string | Unique identifier for selection tracking |
isDisabled | truefalse default | Disables this tag |
children | string | Tag 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;
SpaceorEnterselects the focused tag.