Components
Tag
Neutral, read-only label for one value from the data, with an optional muted key.
import { Tag } from "@openperf/deft";
<Tag.Root label="browser">Chrome 126</Tag.Root>;When to use
| Need | Component |
|---|---|
| A value from the data, optionally with its key | Tag |
| Live status of an item | Dot |
| Fixed flag such as "Demo" or "Expired" | Badge |
| Option the user switches on and off | Chip |
| Long list of attributes with full keys and values | Key value |
Content and overflow
A tag is 22px high and has no tones or pressed state. Tabler icons inside it are sized to 12px, so the value can start with an icon.
The value stays on one line. A tag never grows wider than its container, and a value that does not fit is clipped. To end it with an ellipsis, wrap the text in an element with the truncate class:
<Tag.Root label="transaction">
<span className="truncate">GET /api/projects/:id</span>
</Tag.Root>API
Prop
Type