Badge

A compact status or category label.

Choose color by meaning and theme by visual emphasis. The badge itself is not an action. Sizes are xs, s, and m; colors include warning.

Live example

Badge

Example controls

Usage

import { Badge } from '@prosazhin/pbcomponents';

<Badge
  color='success'
  theme='light'
>
  Ready
</Badge>;

Component API

PropType / variantsPurposeDefault
childrenstringComponent content.—
size'xs' | 's' | 'm'xs · s · mComponent size.m
theme'filled' | 'light' | 'border'filled · light · borderBadge appearance.filled
color'primary' | 'secondary' | 'success' | 'danger' | 'warning'primary · secondary · success · danger · warningSemantic color.primary
leftIconSvgTypenone · check · search · userIcon before the text; accepts an SVG component.—
rightIconSvgTypenone · check · search · userIcon after the text; accepts an SVG component.—
leftIconClassNamestringClass of the left icon.—
rightIconClassNamestringClass of the right icon.—
classNamestringClass of the root element.—
textClassNamestringClass of the text part.—

Native HTML attributes are accepted where the component renders the corresponding element. className props only affect styling.