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
Segun
Editable Example

Props#

NameTypeDefaultDescription
variantsolid, subtle, outlinesolidThe variant style of the tag component.
sizesm, md, lgmdThe size of the tag component.
variantColorstringThe color scheme of the tag variant.

Proudly made in 🇳🇬

Released under the MIT License.

Copyright © 2019 Segun Adebayo