Skip to content

Tag

The Tag component displays a small label with an optional icon, an optional key/value split, and an optional removable action. Use it for metadata, categories, and filter chips.

Installation

import { Tag } from "@harnessio/ui/components";
// Basic
<Tag value="Default Tag" />
// Theme and variant
<Tag value="Outline Tag" variant="outline" theme="blue" />
// Split (key / value)
<Tag label="Env" value="Production" variant="secondary" theme="green" />
// With a leading icon
<Tag value="Labelled" icon="label" theme="yellow" />
// Removable (reset action)
<Tag
value="Removable"
actionIcon="xmark"
onActionClick={() => remove()}
theme="blue"
/>