Skip to content

Tags

Tags are used to display labels or categories that can be applied to items. They help in organizing and filtering content based on specific attributes.

Loading Code Block...
Tag
Loading Code Block...

The `color` prop allows you to change the visual representation of the tag based on the intent.

brand
neutral
warning
success
info
danger
Loading Code Block...

Set the `isOutline` prop to true to display the outline variant of the tag.

brand
neutral
warning
success
info
danger
Loading Code Block...

PropsDefaultTypeDescription
text-stringText to be displayed in the tag.
colorneutral'brand' | 'neutral' | 'success' | 'danger' | 'warning' | 'info'Color of the tag.
isOutlinefalsebooleanIf set, the tag will have an outline style.
icon-ReactNodePre-rendered icon element placed before the text (e.g. `icon={<Settings width={14} height={14} />}`).
children-ReactNodeRendered after `text`. Use to append close buttons, secondary badges, or other inline content.
  • Tags are rendered with semantic contrast colors to ensure text is legible against varied internal backgrounds.
  • If Tags are used purely as indicators (and not interactive elements), they do not receive keyboard focus to prevent cluttering the tab order.
  • Ensure any SVG icons embedded inside tags have their aria-hidden attribute set to true if they are purely decorative, or supply an alternative text description if they convey unique status.