Skip to content

Tag

Tag is used when items need to be labelled, categorized, and organized using keywords that describe them.

Imports

  • Tag Standalone tag component
  • TagGroup Used to group related tags together in a horizontal stack.

Usage

Tag Variants

Tag has 4 variants primary secondary outline ghost

Tag Sizes

Tag comes with 3 sizes sm md lg

Closable Tag

Tags can be closable or removable. If closable prop is passed tag will show a close icon in the suffix.

Tag Prefix/Suffix

Same as buttons Tag also accepts prefix, suffix props which can be used to append or prepend content in the tag.

TagGroup

TagGroup can be used to group multiple tags together & can pass down size, variant props.

While using TagGroup, we will add roving index to the closable icons that means you can move the focus with the arrow keys.

To disable roving index on the tag closable icons you can set allowArrowNavigation=false

API Reference

Tag Props

Prop

Type

Default

idstring-
sizeunionmd
variantunionprimary
closableBooleanfalse
onCloseFunction-
prefixReact.ReactElement-
suffixReact.ReactElement<CloseIcon />

TagGroup Props

Prop

Type

Default

sizeunionmd
variantunionprimary
allowArrowNavigationBooleantrue