Status Badge
StatusBadge builds on Badge with semantic status names, optional icons, and optional dot indicators.
Use it anywhere a status label should read consistently across dashboards, tables, cards, and activity feeds.
Import
Basic Usage
StatusBadge("Live", status="success")
StatusBadge("Pending", status="pending")
StatusBadge("Failed", status="error")
Dot Style
Badge Groups
Status Mapping
| Status | Default Variant | Default Icon |
|---|---|---|
success |
success |
check-circle-fill |
error |
danger |
x-circle-fill |
warning |
warning |
exclamation-triangle-fill |
info |
info |
info-circle-fill |
pending |
warning |
clock-fill |
neutral |
secondary |
none |
Parameters
| Param | Type | Description |
|---|---|---|
label |
str |
Badge text. |
status |
success | error | warning | info | pending | neutral |
Semantic status name. |
variant |
str | None |
Bootstrap variant override. |
icon |
str | None |
Bootstrap icon override. Set "" to suppress the default icon. |
show_dot |
bool |
Show a dot before the label. |
pill |
bool |
Use rounded pill styling. |
faststrap.components.display.status_badge.StatusBadge(label, *, status='neutral', variant=None, icon=None, show_dot=False, pill=True, **kwargs)
Render a semantic status badge.
Source code in src/faststrap/components/display/status_badge.py
faststrap.components.display.status_badge.BadgeGroup(*badges, gap=2, align='center', **kwargs)
Render a wrapping group of badges or chips.