Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Components
  2. Badge
  3. API and Development

Badge

API and Development

View Source
Submit Issue

Badge signals status, category, or metadata in a compact, glanceable format, displaying short pieces of information with visual emphasis via color and size variants.

Props

Name

Type

Default

Description

aria-label

string

—

Accessible name for icon-only badges. Also used as the tooltip title when the badge is icon-only. Prefer visible text when present; required when the badge has an icon and no children.

color

BadgeColor

BadgeColor.Default

Semantic color variant for the badge.

icon

SVGAsset

—

Optional SVG icon displayed before the badge text.

size

BadgeSize

BadgeSize.Regular

Controls the badge dimensions and font size.

Storybook

Interactive examples and edge cases for this component are in Storybook.

Default
Sizes
Colors
With Icon
Icon Only
Colors With Icon
Font Family Snapshot

Default

Use when no specific semantic meaning is required or the badge should be low‑attention.

Semantic colors

Semantic colors convey meaning without requiring users to read the label.

Info

Marks informational context or items that merit awareness.

Success

Indicates success, completion, or a positive state.

Warning

Highlights caution or intermediate states that need attention but are not errors.

Error

Signals failure or an error state. Use sparingly.

Accent colors

Accent colors add variety, useful for categorization or visual grouping.

Lime

A lively alternative to Success. Works for growth or environmental contexts.

Cyan

Useful when many categories need visual differentiation.

Purple

Useful when many categories need visual differentiation.

Violet

Useful when many categories need visual differentiation.

Pink

Useful when many categories need visual differentiation.

Sizes

Use size to reflect prominence and content density.

Small

For tight spaces, lists, or when the badge supplements other content.

Regular

Default size balancing readability and space.

Shape

The current component renders a rounded rectangle.

Rounded (current)

Best for read‑only semantic indicators with no click interactivity.

Pill (future)

Consider for interactive patterns like tags or table filters where clicking changes state.

With icon

Add an icon for extra context or quick recognition.

Icon only

Icon-only badges are square at every size. Provide aria-label so the meaning is announced without visible text; the same value appears in a tooltip on hover.

Small

Regular

Large

Previous

Badge / Usage

Next

Badge / Accessibility

On this page

Props
Storybook
Default
Semantic colors
Info
Success
Warning
Error
Accent colors
Lime
Cyan
Purple
Violet
Pink
Sizes
Small
Regular
Shape
Rounded (current)
Pill (future)
With icon
Icon only
Small
Regular
Large