Skip to content
Harness Design System Harness Design System Harness Design System

StatusBadge

beta

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).

Usage

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>

Themes

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

Variants

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

  • 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: default and sm.

Status StatusBadges

Status badges can optionally include a pulsing indicator to indicate activity using the pulse prop.

API Reference

The StatusBadge component has several props to control its appearance:

PropRequiredDefaultType
variantfalse'primary''primary' | 'secondary' | 'outline' | 'ghost' | 'status'
themefalse'muted''muted' | 'success' | 'warning' | 'danger' | 'info' | 'merged'
sizefalse'default''default' | 'sm'
pulsefalsefalseboolean
classNamefalsestring
childrentrueReactNode