Tag

Callouts provide presentation of content in a visually distinct manner. Includes a heading, icon and typically text-based content.

Screenshot of component Tag basic

Usage

Tag is passed text and rendered in a small neutral bubble by default.

import { Tag } from '@blueprintjs/core'
 
<Tag>
Firmware 1.0
</Tag>

Size

The size of the label has a toggle with the large property.

Screenshot of component Tag normal
Screenshot of component Tag large
<Tag large>Bigger and better</Tag>

Use fill to span the width of the parent container.

Screenshot of component Tag fill
<Tag fill>Long text goes here</Tag>

Intent

Tags have configurable intent settings for colour control.

Screenshot of component Tag with-default-intent
Screenshot of component Tag with-primary-intent
Screenshot of component Tag with-success-intent
Screenshot of component Tag with-warning-intent
Screenshot of component Tag with-danger-intent
<Tag intent="warning">
Electronics might be on fire!
</Tag>

As with all other components, the intent prop also accepts an enum value.

import { Tag, Intent } from '@blueprintjs/core'
 
<Tag intent={Intent.DANGER}>
Yep, that's smoke...
</Tag>

Minimal Appearance

The minimal prop reduces the visual impact of the Tag by reducing contrast.

Screenshot of component Tag minimal
<Tag minimal>Subtle styling</Tag>

Use of minimal will override intent colouring for a softer appearance.

Screenshot of component Tag minimal-primary-intent
Screenshot of component Tag minimal-success-intent
Screenshot of component Tag minimal-warning-intent
Screenshot of component Tag minimal-danger-intent

Icon

Add an icon or rightIcon by specifying the name of the icon as a string or IconNames enum value.

Screenshot of component Tag with-icon
Screenshot of component Tag with-icon-right
import { IconNames } from "@blueprintjs/icons";
 
<Tag icon={IconNames.AIRPLANE}>
Is it a bird?
</Tag>
<Tag rightIcon="airplane">
Is it a plane?
</Tag>