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#
Green
Green
Green
Editable Example
With right icon#
Green
Green
Editable Example
With close button#
Green
Green
Green
Editable Example
With custom element#
SA
Editable Example
Props#
Name | Type | Default | Description |
---|---|---|---|
variant | solid , subtle , outline | solid | The variant style of the tag component. |
size | sm , md , lg | md | The size of the tag component. |
variantColor | string | The color scheme of the tag variant. |