Badge

A small semantic label chip for status, category, and metadata.

Preview#

In Progress
Controls
import { Badge } from "raft-ui";

<Badge />

Variants#

DefaultPendingOpenSavedNewLiveWarningFailed

Appearance#

defaultprimaryinformationmutedaccentsuccesswarningdanger
defaultprimaryinformationmutedaccentsuccesswarningdanger
defaultprimaryinformationmutedaccentsuccesswarningdanger

Casing#

task #42 @bugenIn Progress

Icons#

ApprovedOnlineAvailable

Spinner#

SyncingLoading

Composition#

Experimental
Live

Release channel

Warning

deploy:warning

Retry

Sync failed

API#WIP

PropTypeDefaultDescription
appearance"solid" | "soft" | "outline""solid"Visual treatment. Solid keeps the current filled badge, soft uses the lighter token ramp, and outline uses a transparent fill with a semantic border.
variant"default" | "primary" | "information" | "muted" | "accent" | "success" | "warning" | "danger""default"Semantic label/status variant. Uses shared semantic color tokens instead of raw brutal color names.
uppercasebooleanfalseApply the Brutal badge casing recipe: uppercase plus wider tracking. Elegant preserves the caller's casing. Defaults off so case-sensitive content stays intact.
renderReactElement | (props, state) => ReactElementSwap the root element. Use render={<button type="button" />} for the old BadgeButton shape.
...propsBase UI useRender span propsNative span attributes plus Base UI render composition props.