Skip to main content
Urbicon UI
source

Badge

Compact labels for status, categories, and counts with multiple visual styles.

New
Loading...
Loading syntax highlighting...

01 Examples

Counter (numeric pill)

The counter prop locks min-width to height so single-digit numbers render as a circle. Compare a text badge with the same intent to see the effect.
3 unread 3 12 99+
Loading...
Loading syntax highlighting...

Border (visual separation on colored surfaces)

The border prop adds a 2px ring in the page surface color — invisible on the default page background, but it cuts a clean halo when the badge overlays a colored avatar, image, or button.
JD
JD
AB 5
Loading...
Loading syntax highlighting...

Notification Counter

3
12
Loading...
Loading syntax highlighting...

02 Patterns

Badge serves five distinct use cases that look alike but behave differently. Picking the right pattern up-front avoids API-shape regret later — particularly around removable vs interactive, counter sizing, and placement-anchoring. A future purpose axis (tag / counter / dot / chip) will make this taxonomy first-class; until then, the five patterns below are the canonical reference.

1. Status Tag — stateful label

Communicate the current state of an entity (Active/Inactive, Draft/Published, Online/Offline). Use `variant=soft` for ambient lists, `variant=outlined` for higher-contrast tables. Never removable, never a number.
Active Pending Suspended Draft Published
Loading...
Loading syntax highlighting...

2. Counter — numeric pill

`counter` locks the badge to a circle/pill geometry that holds 1–3 digits cleanly. Always pair with a `placement` when anchoring to a Button or Avatar — see the Notification Counter example above.
3 12 99+ 247
Loading...
Loading syntax highlighting...

3. Indicator Dot — presence/state marker

`variant=dot` strips all content and shrinks the badge to a presence indicator — typical on avatars (online/away/busy) or buttons (unread bell). Pair with `border` when overlaying a colored surface to cut a clean halo.
JD
AB
MK
Loading...
Loading syntax highlighting...

4. Filter Chip — removable, user-applied

Use `removable` to show user-applied filters or selected tags that can be dismissed. Pair with `onRemove`. Press Delete / Backspace while focused to remove via keyboard.
Active Premium Last 7 days
Loading...
Loading syntax highlighting...

5. Inline Label — categorization in prose

Plain, read-only marker rendered inside a sentence or list item. Prefer `variant=outlined` or `variant=soft` over `filled` so the badge reads as taxonomy, not as a state change.

The Beta release adds support for OKLCH color tokens and a redesigned Tier API . Existing consumers can opt-in per component.

Loading...
Loading syntax highlighting...

When to pick which

PatternKey PropRecommended Variant
Status Tagvariantsoft or outlined
Countercounter · placementfilled
Indicator Dotvariant="dot" · borderdot (locked)
Filter Chipremovable · onRemovesoft
Inline Labeloutlined or soft

Mixing patterns (e.g. counter + removable, or filter-chip with `intent=danger`) usually points at a different component — a deletable counter is a Chip, a danger-tinted filter is a state-tag of the search itself.

03 Customization

Gradient Tags

Use slotClasses to turn badges into vibrant category tags.
Featured New Release Trending
Loading...
Loading syntax highlighting...

Glassmorphism

Frosted glass badges over rich backgrounds.
PRO Beta Live
Loading...
Loading syntax highlighting...

Neon Glow

High-contrast neon badges for dark interfaces.
Online Syncing Offline
Loading...
Loading syntax highlighting...

Fully Custom (unstyled)

Drop all defaults and build a completely unique badge.
v2.4.0 ★ Editor's Pick
Loading...
Loading syntax highlighting...

04 Accessibility

Built-in ARIA

Badges render with role="status" by default, announcing content changes to screen readers. Removable badges include an accessible label for the remove button. Set role="alert" for time-sensitive notifications.

Keyboard

Interactive badges are focusable via Tab and activate with Enter / Space. Removable badges also respond to Delete / Backspace.

Reduced Motion

Pulse animations and Mint effects are suppressed when prefers-reduced-motion is enabled.

04 API Reference

21 props
21 props

No matching properties

No matching properties

05 Installation

Import

Loading...
Loading syntax highlighting...