Skip to content

Badge

A small count or status label.

Group: Feedback · Kind: macro · in the lite catalog

example
Active
variant · secondary
Active
variant · outline
Active
variant · ghost
Active
variant · destructive
Active
variant · link
Active

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-badge on Web
exponential-ui-badge on iOS
exponential-ui-badge on Android
exponential-ui-badge on Desktop
Prop Type Required Bindable Description
text string yes yes The label or number.
variant default | secondary | outline | ghost | destructive | link – yes Filled, secondary, outlined or destructive. Default "default".
icon icon – – An icon before the text.

None.

None.

none

No basic catalog component maps here.

Box · Icon · Text

Role: text

text (status)

Not focusable; no keys.

Recipe parts: Badge/root Badge/icon Badge/label

Keyed by: variant :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Icon · Text · Alert · Chip · EmptyState · Progress · Meter · Ring