Skip to content

Status Badge

The StatusBadge component is used to highlight and display small pieces of information, such as status indicators or labels. It supports multiple visual variants and color themes, and is non-interactive (read-only).

Variations

Themes

The StatusBadge component supports different color themes, including muted (default), success, warning, danger, info, merged, and risk.

Variants

The StatusBadge component supports different visual variants, including primary (default), secondary, outline, ghost, and status.

  • The status variant supports an optional pulse prop for animated status indication.
  • For all other variants, the pulse prop is not allowed.

Sizes

The StatusBadge component comes in two sizes: sm and md.

Icon support

The StatusBadge component supports an optional icon prop to display an icon inside the badge. icon is available on all variants except status.

Status badges

Status badges (the status variant) can optionally include a pulsing indicator to signal activity using the pulse prop.

Installation

import { StatusBadge } from '@harnessio/ui/components'
// ...
// Status badge with pulse
<StatusBadge variant="status" theme="success" pulse>Status</StatusBadge>
// Other variants (pulse not allowed)
<StatusBadge variant="primary" theme="info">Info</StatusBadge>
<StatusBadge variant="secondary" theme="warning">Warning</StatusBadge>
<StatusBadge variant="outline" theme="danger">Danger</StatusBadge>
<StatusBadge variant="ghost" theme="muted">Muted</StatusBadge>