PolyHunter

StatusBadge

Badge with a status dot — every variant has a border and a 6px circle in the text color on the left. All colors from tokens in @npolyhunter/ds/theme.css.

Playground

Live preview

Active

Examples

All variants

success smallsuccess mediumwarning smallwarning mediumdanger smalldanger mediuminfo smallinfo mediumpending smallpending mediumdisabled

Spec

// Same spec as Badge, but:
//   - every variant has a border (colored variants: foreground color at 30%)
//   - a 6px circle (size-1.5) in the text color sits left of the label
<StatusBadge variant="success">Live</StatusBadge>

Code

import { StatusBadge } from "@npolyhunter/ui";

// Every variant has a border + a 6px dot in the text color on the left
<StatusBadge>Offline</StatusBadge>
<StatusBadge variant="success">Live</StatusBadge>
<StatusBadge variant="info">Guild</StatusBadge>
<StatusBadge variant="warning">Hunter</StatusBadge>

<StatusBadge size="small">Pending</StatusBadge>

Code

<StatusBadge
  variant="${variant}"   // "success" | "warning" | "danger" | "info" | "pending"
  size="${size}"         // "small" | "medium"
  disabled={disabled}         // 45 pct opacity
>
  ${text}
</StatusBadge>

Used in

Includes use through shared UI components.

AppBack Office