Skip to content

Tag

Tag is a short label for a status, a category or a keyword. It can be closable, or work as a toggle with checkable.

Demos

Type

type picks the color role: a tinted background, a border and text in the same hue. bordered={false} drops the border.

Size and shape

Four sizes, plus round and strong.

Closable

closable adds a × button with an accessible name from the locale. Clicking it calls onClose and doesn’t reach the tag’s own onClick unless triggerClickOnClose is set.

Checkable

A checkable tag is a toggle: it renders as role="checkbox", and click, Enter or Space call onCheckedChange.

Icon

Custom color

color overrides the background, border and text color of one tag. Take the colors from the Raft palette so the tag stays in the system and follows the theme into dark mode: step 9 with contrast text for a solid tag, steps 2 / 7 / 11 for a subtle one.

Props

NameTypeDefaultDescriptionVersion
typedefault | primary | accent | info | success | warning | errordefaultColor role.Unreleased
sizetiny | small | medium | largemediumHeight and text size.Unreleased
borderedbooleantrueShows the border. Falls back to ConfigProvider’s bordered.Unreleased
roundbooleanfalsePill shape.Unreleased
strongbooleanfalseBolder text.Unreleased
closablebooleanfalseAdds a × button. Ignored when checkable.Unreleased
onClose(event) => voidundefinedCalled when × is clicked.Unreleased
triggerClickOnClosebooleanfalseLets the × click also reach the tag’s onClick.Unreleased
checkablebooleanfalseMakes the tag a toggle (role="checkbox").Unreleased
checkedbooleanfalseWhether a checkable tag is on.Unreleased
onCheckedChange(checked: boolean) => voidundefinedCalled with the next checked state.Unreleased
disabledbooleanfalseBlocks closing and toggling.Unreleased
iconReactNodeundefinedAn icon before the label.Unreleased
color{ color?, borderColor?, textColor? }undefinedOverrides the tag’s colors.Unreleased

Tag also accepts native span attributes and a ref.