Getting started

Actions

Forms

Layout

Navigation

Overlays

Feedback

Data display

Controllers

Helpers

Recipes

Badge

Badges display compact status, counts, or inline labels next to headings and controls.

Try it

Beta

Usage

import { RuiBadge } from '@ecopages/radiant-ui/badge';

<RuiBadge variant="outline">Beta</RuiBadge>

Badge vs chip

Use RuiBadge for status and counts (Beta, 3, Error). Use RuiChip for category tags and filter entities in pill-shaped containers.

With spinner

Place RuiSpinner inside a badge to show a syncing or processing state.

Variants

Error

Theming

variantSemantic roles
filledprimary-container, on-primary-container
outlineborder, background, on-background
destructiveerror, on-error
ghoston-surface
mutedsurface-container, on-surface

API

RuiBadge is a presentational JSX view over a <span>, no custom element.

Props

PropTypeDefaultDescription
variantfilled · outline · destructive · ghost · mutedfilledVisual tone.

CSS classes

ClassDescription
.rui-badgeBadge root.
.rui-badge--filledPrimary emphasis on primary-container.
.rui-badge--outlineBordered badge on background.
.rui-badge--destructiveError emphasis.
.rui-badge--ghostSubtle text-only badge.
.rui-badge--mutedMuted surface badge.