Skip to content
nexubDesign System
v2.4.0

Components · Labels & Badges

Badge

StableSince v0.0.1

Small status indicator or label. Communicates state, category, or count.

import { Badge } from '@nexub/react';

Usage

Use it for
  • Labelling a status, category, or tag on an item

  • Showing a count or numeric indicator alongside an element

  • Highlighting new, featured, or updated content

  • Communicating a stage in a workflow (draft, published, archived)

Use something else for
  • Interactive filtering — use FilterChip or Chip instead

  • Long text labels that exceed 2–3 words

  • Critical alerts requiring user action — use Alert or Toast

  • Replacing a button — badges are non-interactive by design

Playground

Playground

Live
Badge
<Badge variant="soft" tone="neutral">Badge</Badge>

Examples

Tones

Variants

With leading dot

Variant matrix

Variants × tone / variant5 × 3
tone ↓ / variant →solidsoftoutline
success
Badge
Badge
Badge
danger
Badge
Badge
Badge
warning
Badge
Badge
Badge
info
Badge
Badge
Badge
neutral
Badge
Badge
Badge

Props

Props
PropTypeDefaultDescription
variant'solid' | 'soft' | 'outline''solid'Visual fill style.
tone'success' | 'danger' | 'warning' | 'info' | 'neutral''neutral'Semantic color tone.
size'sm' | 'md' | 'lg''md'Badge size.
leadingIconReact.ReactNode—Icon or dot rendered before the label.

Accessibility

ARIA roles

status (when conveying live state)

Keyboard

  • —

    Badges are non-interactive and have no keyboard handlers.

Focus

  • Skipped in tab order. Decorative — never trap focus on a Badge.

Screen reader

  • Reads as inline text. For live status changes, wrap in an element with `role="status"` and `aria-live="polite"`.

Notes

  • For interactive equivalents (filtering, dismissing) reach for `Chip` or `FilterChip`.