MiHCM
data/@mihcm/ui·v0.21.0·stable

StatusBadge

Small inline icon + label chip used to mark something as "Module enabled" / "No permission" / "Active". Five built-in tones plus an optional leading icon.

Use cases

  • Module state — "Module enabled" / "No module" next to a permission row.
  • Permission state — "Permission set" / "No permission" inside the role editor.
  • Inline labels wherever an icon + short tone label scans faster than a plain badge.

When NOT to use

  • For a counter overlay on an icon (bell, inbox) → use NotificationBadge.
  • For a generic tag pill with no semantic state → use Badge.
  • For longer-form messages → use Alert or a status banner.

Tones

ToneMeaning
successA positive state — module enabled, permission set, available.
warningConfiguration is incomplete — "No module" / "No permission".
dangerA blocking error or revocation.
infoNeutral metadata — "Beta", "New", "In review".
neutralDefault catch-all. Quiet contrast.

Composition

  • The icon slot accepts any 12 × 12 SVG. Stroke colour inherits currentColor, so you don't recolour the SVG yourself — the tone class does it.
  • Keep the label to 1–3 words. Longer copy belongs in an Alert or a tooltip.
  • Badge — generic tag pill without semantic tones.
  • NotificationBadge — counter overlay on icons.
  • Alert — longer-form status messages with title and description.