StatusBadge
FiddleLivePublishingError
Usage
The import, then a use to start from. Both copy as they are.
Import
import { StatusBadge } from "@/components/ui/StatusBadge";Example
<StatusBadge status="live" /><StatusBadge status="publishing" size="sm" /><StatusBadge status="failed" />When to use
Use it for
- System state from the backend: a site's publish status, a token's state, a pull request.
- Pass the
statusand nothing else: the badge owns the dot, the color and the words. - Statuses include
live,publishing,running,successful,failed,error,unpublished,paused,revoked, the pull-request statesopen,merged,closedanddraft, and an SDK's:queued,generatingandgeneratedwhile the Fern CLI makes it, thenrelease-pendingand the-versionstates of a generation-log row,not-publishedfor an SDK that went nowhere yet, andbreakingfor a method change in a version comparison. size="sm"in dense rows and tables.
Avoid
- A
Badgewith a hand-picked color for a stateStatusBadgealready has. - A label of your own. If a state is missing, add it to
StatusBadgeso every screen gets it.
Accessibility
Checks
- The label carries the meaning; the dot only reinforces it.
API
Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.
StatusBadge
Its stories don't declare
argTypes, so no props are listed. The variants show its states.VariantsLiveSuccessfulPublishingRunningErrorFailedUnpublishedLoadingUncommittedPreviewActiveRevokedPausedPublishedReleasePendingPublishedVersionPendingVersionUnpublishedVersionNotPublishedBreakingOpenClosedMergedDraftSmallUnknownChangeRequestStagesAll
Keep going
- BadgeStatic labels and counts. Neutral by default; status hues only when the badge is the status.Frond
- NoteInline message with an icon: info, success, warning, error, bold.Fiddle
- DataTable, PaginationLists of records with sorting, selection and paging.Fiddle
Color
Semantically named colors and a set of ramps for the full palette. Optimized for light and dark.