- Docs
- Components
- Data display
Badge
A short, static status or count: one or two words. The word carries the meaning, the tone reinforces it.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<span>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
Active
Tone
Variant
Size
import { Badge } from "@qeetrix/react";
<Badge tone="success">Active</Badge>02
Tones
The word carries the meaning; the tone only reinforces it.
DraftQeet ProInvitedActivePendingBlocked
<Badge>Draft</Badge>
<Badge tone="brand">Qeet Pro</Badge>
<Badge tone="info">Invited</Badge>
<Badge tone="success">Active</Badge>
<Badge tone="warning">Pending</Badge>
<Badge tone="danger">Blocked</Badge>03
Solid
variant="solid": the bold fill, for the one status in a view that must stand out.
DraftQeet ProInvitedActivePendingBlocked
<Badge tone="danger" variant="solid">Overdue</Badge>04
With an icon
icon: a 12px sharp icon before the word, decorative.
VerifiedExpires in 9 daysSuspended
<Badge tone="success" icon={CircleCheckIcon}>Verified</Badge>
<Badge tone="warning" icon={ClockIcon}>Expires in 9 days</Badge>
<Badge tone="danger" icon={BanIcon}>Suspended</Badge>05
Sizes
md, 20px, by default; sm, 16px, for tight rows and beside small text.
ActiveActive
<Badge tone="success">Active</Badge>
<Badge tone="success" size="sm">Active</Badge>06
In a list
Beside what it describes, at its end.
qid_live_4xKz…9Rp2Live
qid_test_8bQm…1Lc7Test
qid_live_7yHd…3Va9Revoked
<Inline justify="between">
<Text mono size="sm">qid_live_4xKz…9Rp2</Text>
<Badge tone="success">Live</Badge>
</Inline>07
Long text
It truncates with an ellipsis: pass title with the full text where it may be cut.
Awaiting approval from the finance team
<Badge tone="info" title="Awaiting approval from the finance team">
Awaiting approval from the finance team
</Badge>