Skip to content

Tag

Compact chip for displaying selected values, filters, tags, or removable entities.

Design
<Tag label="Design" />
Design
<Tag label="Design" icon={TagIcon} />
Removable
<Tag label="Removable" onRemove={() => undefined} />
SmallMediumLarge
<HStack align="center" gap={2}>
<Tag icon={TagIcon} label="Small" size="sm" />
<Tag icon={TagIcon} label="Medium" size="md" />
<Tag icon={TagIcon} label="Large" size="lg" />
</HStack>
redorangeyellowgreentealcyanbluepurplepinkgray
<HStack gap={2} wrap="wrap">
{colors.map(color => (
<Tag color={color} key={color} label={color} />
))}
</HStack>
<Tag label="Click me" onClick={() => undefined} />
<Tag label="Editable" onClick={() => undefined} onRemove={() => undefined} />
<Tag label="Link tag" href="#" />
<Tag label="Link" href="#" onRemove={() => undefined} />
DisabledDisabled
<HStack gap={2}>
<Tag isDisabled label="Disabled" />
<Tag isDisabled label="Disabled" onClick={() => undefined} />
<Tag isDisabled label="Disabled" onRemove={() => undefined} />
</HStack>
Starred
<Tag label="Starred" icon={Star} isLabelHidden />
Issues3
<Tag label="Issues" endContent={<Badge color="info" label={3} size="sm" />} />
Design
<Tag label="Design" description="High priority design task" />
Design
<Tag label="Design" tooltip="Design category" />

Compact chip for displaying selected values, filters, tags, or removable entities.

PropTypeDefaultDescription
classNamestringAdditional CSS class names applied to the tag.
color"red" | "orange" | "yellow" | "green" | "teal" | "cyan" | "blue" | "purple" | "pink" | "gray"'gray'Visual color.
data-testidstringTest ID applied to the tag root.
descriptionstringAccessible description for the tag.
endContentReactNodeContent rendered after the label and before the remove button.
hrefstringLink destination. When provided, the tag renders as a link.
iconIconComponentIcon rendered before the label.
isDisabledbooleanfalseWhether the tag is disabled.
isLabelHiddenbooleanfalseWhether to visually hide the label while keeping it available to screen readers.
label*stringTag text.
onClickMouseEventHandler<HTMLElement>Click handler.
onRemove(event: MouseEvent<HTMLButtonElement>) => voidCalled when the remove button is clicked. When provided, a remove button is shown.
refRef<HTMLElement>Ref forwarded to the tag root element.
size"sm" | "md" | "lg"'md'Visual size.
startContentReactNodeContent rendered before the icon and label.
styleCSSPropertiesInline styles applied to the tag.
tooltipstringTooltip text shown on hover.