Tag
Tag component is used for items that need to be labeled, categorized, or organized using keywords that describe them.
Import#
Chakra UI exports 4 Tag related components:
- Tag: The wrapper for all the tag elements
- TagLabel: The label for tag's text content.
- TagIcon: The icon for the tag
- TagCloseButton: The close button for the tag.
Usage#
Sample Tag
Editable Example
Gray
Gray
Gray
Editable Example
With left icon#
Cyan
Cyan
Cyan
Editable Example
With right icon#
Cyan
Teal
Editable Example
With close button#
Cyan
Cyan
Cyan
Editable Example
With custom element#
SA
Editable Example
Props#
Name | Type | Default | Description |
---|---|---|---|
variant | solid , subtle , outline | subtle | The variant style of the tag component. |
size | sm , md , lg | lg | The size of the tag component. |
variantColor | string | gray | The color scheme of the tag variant. |