UI
StatusBadge
StatusBadge pairs a colored dot with a text label so the state is readable without color.
Import
import { StatusBadge } from '@tallyui/components';Usage
<StatusBadge label="Awaiting payment" variant="warning" size="caption" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | Required | Visible name of the state |
variant | 'default' | 'ok' | 'warning' | 'bad' | 'info' | 'muted' | 'default' | Sets the dot color, not the label color |
size | 'default' | 'caption' | 'default' | Sets the dot size and label style |
className | string | — | Additional classes for the row |
Other React Native ViewProps are forwarded to the row.
Variants
The exported statusDotVariants supplies the dot classes for each variant and size.
| Variant | Dot color |
|---|---|
default | bg-primary |
ok | bg-success |
warning | bg-warning |
bad | bg-destructive |
info | bg-info |
muted | bg-muted-foreground |
| Size | Dot size | Label style |
|---|---|---|
default | size-2 | text-sm text-foreground |
caption | size-1.5 | text-xs text-muted-foreground |