Tag
On this page
Overview
A tag provides a short, pill-shaped label for categorizing content or
indicating status. It should include an icon when color alone conveys
meaning. Linked tags must have descriptive text for screen readers, and
should provide an aria-label on group containers. When disabled, Enter
keyboard navigation is suppressed on linked tags.
Edit element properties
import '@rhds/elements/rh-tag/rh-tag.js';
<rh-tag>Tag</rh-tag>
import { Tag } from "@rhds/elements/react/rh-tag/rh-tag.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<Tag>Tag</Tag>
);
The name of the icon to display in the tag.
When set, an rh-icon element renders in the icon slot as a decorative visual.
The icon set from which to select the icon. Defaults to ui.
The visual style variant of the tag.
filled: colored background with a subtle border (default)outline: transparent background with a colored borderdesaturated: transparent background with a neutral border and text color
The size of the tag. When set to compact, the tag uses a smaller font
size and reduced padding.
Optional URL that makes the tag a navigable link. When set, the tag renders an anchor element around its text content.
Whether an interactive (linked) tag is disabled. When true, the tag visually appears inactive and keyboard navigation is suppressed.
The color palette of the tag. Nine colors are available. Choose colors that correspond to the tag's semantic meaning (e.g. red for errors, green for success). Defaults to gray.
Note: cyan is accepted but deprecated; use teal instead.
Status
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
In Progress
When to use
- Categorize content
- Add context or clarity to elements
- Indicate status
Status checklist
| Property | Status | Meaning |
|---|---|---|
| Figma library |
|
Component is available in the Figma library |
| RH Elements |
|
Component is available in RH Elements |
| RH Shared Libs |
|
Component is being developed for RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.