Tag

The Tag component represents visual labels, categories, or keywords. It supports different variants, shapes, interactive closing behavior, custom icons, and dynamic slotted content.

When To Use

  • It can be used to tag by dimension or property.
  • When categorizing.

Tag

Tags come in default and outline variants. By default, tags are removable.

Default Tag Outline Tag

Tag

Tags support different color intents for conveying context such as primary, success, warning, danger, and info.

Primary Success Warning Danger Info

Tag

Control the Tag's border radius using the shape prop (pill or square).

Pill Shape Square Shape

Tag

Set removable={true} (default) to show a close button. By default, it completely removes its DOM node when clicked. You can override this via onRemove prop.

Closable Tag Alert on Close

Tag

Add left or right icons using iconLeft and iconRight props. You can also pass dynamic content as a slot instead of using the label prop.

Search Settings
Custom Slot Tag

Tag

Tags can be marked as disabled to prevent interaction.

Disabled Tag

API Reference

Property
Description
Type
Default

variant

Visual style variant 'default' | 'outline' 'default'

intent

Color intent for context 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' 'default'

shape

Border radius shape 'pill' | 'square' 'pill'

disabled

Disables interactions and reduces opacity boolean false

removable

Shows a close button boolean true

label

Text content (if not using slot) string '-'

iconLeft

Icon name to show on the left IconName '-'

iconRight

Icon name to show on the right IconName '-'

onRemove

JavaScript string to execute when close is clicked string '-'