Overview
TheTagStatus component displays compact, color-coded status badges. It supports 13 different color schemes and an optional dot variant for minimal status indicators.
Basic Usage
Status Colors
Green (Paid/Success)
Yellow (Processing/Warning)
Red (Error/Failed)
Orange (Draft)
Blue (Sent/Info)
Purple (Registered)
Teal (Completed)
Steel Blue (Received)
Crimson (Rejected)
Grey (Void/Neutral)
Additional Colors
Dot Variant
Use thedot prop for a minimal status indicator:
Dot Only (No Label)
Create a small status dot without text:In Data Tables
Commonly used in table cells for status columns:Multiple Status Indicators
Props
The text displayed in the tag. Can be omitted for dot-only indicators.
The color scheme of the tag.Possible values:
'green'- Green (paid, success, active)'yellow'- Yellow (processing, pending, warning)'red'- Red (error, failed, rejected)'orange'- Orange (draft, incomplete)'blue'- Blue (sent, delivered, info)'purple'- Purple (registered, verified)'teal'- Teal (completed, finished)'steelBlue'- Steel blue (received, acknowledged)'crimson'- Crimson (rejected, declined)'olive'- Olive green'blueViolet'- Blue violet'grey'- Grey (void, cancelled, neutral)'empty'- Light grey with shadow
When
true, displays a colored dot before the label. Creates a more subtle status indicator.If label is empty and dot is true, displays only a small colored dot.Styling Details
Default Tag Styling
- Typography:
text-sm,font-medium,leading-4 - Shape: Rounded corners with
roundedclass - Spacing:
py-0.5vertical padding,px-1horizontal padding - Layout: Inline flex with centered items and 0.25rem gap
Dot Variant Styling
Whendot={true}:
- Horizontal padding increases to
px-1.5 - Dot size: 8px (size-2)
- Dot shape: Rounded with
rounded-[2px] - Label wraps with
whitespace-nowrap
Dot Only (No Label)
Whendot={true} and no label:
- Zero padding (
p-0!) - Only the colored dot is visible
- Minimal footprint for space-constrained layouts
Color Mappings
Each status has specific background, text, and dot colors defined in the Tailwind theme:| Status | Background | Text | Dot |
|---|---|---|---|
green | bg-background-status-paid | text-foreground-status-paid | bg-icon-status-paid |
yellow | bg-background-status-processing | text-foreground-status-processing | bg-icon-status-processing |
red | bg-background-status-error | text-foreground-status-error | bg-icon-status-error |
orange | bg-background-status-draft | text-foreground-status-draft | bg-icon-status-draft |
blue | bg-background-status-sent | text-foreground-status-sent | bg-icon-status-sent |
purple | bg-background-status-registered | text-foreground-status-registered | bg-icon-status-registered |
teal | bg-background-status-completed | text-foreground-status-completed | bg-icon-status-completed |
steelBlue | bg-background-status-received | text-foreground-status-received | bg-icon-status-received |
crimson | bg-background-status-rejected | text-foreground-status-rejected | bg-icon-status-rejected |
grey | bg-background-status-void | text-foreground-default-secondary | bg-icon-status-void |
empty | shadow-avatar | text-foreground-default-secondary | bg-icon-default-secondary |
Use Cases
- Invoice status: Paid, pending, overdue, void
- Order status: Processing, shipped, delivered, cancelled
- Document status: Draft, sent, signed, completed
- User status: Active, inactive, pending, suspended
- Payment status: Paid, processing, failed, refunded
- Availability indicators: Online, away, busy, offline (with dot)
Accessibility
- Color is not the only indicator (text labels are provided)
- Sufficient contrast ratios between background and text
- Compact size maintains readability
- Inline display works well with screen readers
TypeScript
The component is fully typed with theTagStatusProps interface:
Related Components
- StatusLabel - For status with icons in feeds
- Notification - For contextual status messages
- DataTable - Often uses TagStatus in cells