Tags are small, label-like elements from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/zendeskgarden/website/llms.txt
Use this file to discover all available pages before exploring further.
@zendeskgarden/react-tags package. Use them to add metadata to content (category, attribute, property), communicate status, or represent active filter parameters.
To prompt a user action, use a Button instead of a Tag.
Installation
Usage
Default
A basic Tag wraps short text content.Size
Tags come in three sizes. The default size ismedium.
Color
Tags can be colored using a theme palette hue name or a hex value.Shape
Tags are rectangular by default. UseisPill for a pill shape or isRound for circular tags (reserved for very short content like two-digit numbers).
With avatar
Medium and large Tags can contain aTag.Avatar. Place it as the first child inside the Tag.
Closeable tag
AddTag.Close as the last child to allow a tag to be dismissed. Always provide an aria-label for accessibility.
Component structure
Props
Tag
Controls the height and text size of the tag.
A theme palette hue key (e.g.
'blue', 'dangerHue') or a hex color string (e.g. '#3A3A3A'). Sets the background color of the tag.Renders the tag with fully rounded (pill) corners.
Renders the tag as a circle. Reserve for very short content such as two-digit numbers.
Tag text is bold by default. Set to
false for regular weight.Tag.Avatar
Displays child media (icon or image) inside the tag with appropriate sizing. Must be placed as the first child ofTag.
Tag.Close
Renders a close icon with accessibility attributes for tag dismissal. Must be placed as the last child ofTag.