Tag
<Tag>TailwindCSS ModulesTags are neutral filter chips or metadata indicators. They support optional status dots, avatars, trailing counts, and close buttons for interactive filtering contexts.
npx coloxo add tag --style coloxo-cssimport { Tag } from '@coloxo/ui';Design Tokens:
1. Variant Matrix
Different combinations of Tag content.
| Base | With dot | With count | With avatar | Dismissible | |
|---|---|---|---|---|---|
| Default | Engineering | Operational | Open issues12 | Remote |
2. Control heights (Sizes)
Sizes match standard spacing increments.
Sizes
size="sm"Compact filter bars, dense lists
size="md"DEFAULTStandard forms, standard empty states
size="lg"Hero sections, primary filter chips
3. Interactive Props Configurator
dot
count
avatarSrc
onClose
<Tag> Label</Tag>4. Dark theme
Tags automatically adapt to dark mode using CSS variables.
5. Enterprise layout compositions
Tags are frequently used in filter toolbars and data tables.
Accessibility
When an onClose handler is provided, the embedded close button is fully keyboard accessible.
The close button has an aria-label of 'Remove tag' for screen readers.
The leading dot is decorative and hidden from screen readers using aria-hidden='true'.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | "lg" | md | Size. |
| count | number | string | — | Trailing count. |
| onClose | () => void | — | Remove tag. |