Tally UI
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

PropTypeDefaultDescription
labelstringRequiredVisible 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
classNamestring—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.

VariantDot color
defaultbg-primary
okbg-success
warningbg-warning
badbg-destructive
infobg-info
mutedbg-muted-foreground
SizeDot sizeLabel style
defaultsize-2text-sm text-foreground
captionsize-1.5text-xs text-muted-foreground