Skip to content
ComponentsMarkdown

Badge

Label status, category, or count in a 24px-tall inline pill with radius-xs corners. Feedback badges always carry descriptive text alongside their semantic tint.

Live example

NeutralOutlineBrandQueuedVerifiedDeprecatedFailed

Props

PropTypeDefaultDescription
variant"neutral" | "outline" | "brand" | "info" | "success" | "warning" | "destructive""neutral"Visual style and semantic feedback role.

Sizes and tokens

Tier / RoleTokenValue
Height--space-624px
Corner radius--radius-xs2px
Typography--text-caption12px / 16px line height
Feedback tint--<role>-subtle / --<role>-border / --<role>-textStep 3 fill · step 6 border · step 11 text

States

Syncing 12 files344 checks passedRate limit 85%Build failed

Code

import { Badge } from "@freshgemui/monoplinth";

export function Example() {
  return (
    <div className="flex items-center gap-2">
      <Badge>Draft</Badge>
      <Badge variant="success">Verified</Badge>
      <Badge variant="destructive">Failed</Badge>
    </div>
  );
}

Do and don't

Do: Always include text inside feedback badges
Pair semantic tint colors with clear status text such as Verified, Queued, or Failed so state never relies on color alone.
Don't: Render color-only status dots or interactive click handlers on Badge
Do not use empty feedback badges or attach click actions to Badge; use Button for interactive triggers.

Accessibility

  • Feedback variants pair step 11 -text on step 3 -subtle at >= 4.5:1 contrast across all themes and modes.
  • Feedback badges always carry text to satisfy WCAG 1.4.1 (Use of Color).

Rationale

Restricting Badge to 24px height, 2px radius, and 12px caption text keeps status metadata scannable without competing with Button controls.