Display

Badges for compact labels

Use badges when you need concise metadata—counts, statuses, or lightweight tags—without pushing users into a separate detail view. Fits tables, filters, and React component props for Next.js dashboards.

BetaOutlineLiveBlocking

Examples

Pill and square shapes with shared palette tokens.


Featured

Badge variants examples

Appearance tokens (pill, medium), then sizes, then shapes including dot. Each snippet begins with Variant: naming the row.


Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

Featured

What it does

Badges inherit typography scales tuned for dense interfaces.

Combine with icons sparingly to preserve scan speed.

Composition and API

Prefer compound subcomponents instead of one oversized prop bag. Export a small, documented API for your design system.

Avoid relying on color alone; pair hue changes with text for state clarity.

Common use cases

  • Highlight unread counts on navigation tabs.
  • Tag environments (staging vs production) in admin headers.
  • Annotate data grid rows with processing states.
  • Mark beta features in settings panels.

Accessibility

Keyboard order, focus rings, and ARIA attributes should match production usage. Test with your supported browsers and assistive technologies when semantics are non-trivial.

This preview page exposes a single h1 in the hero for a clean outline.

Next.js integration notes

Colocate examples under the App Router, keep server and client boundaries explicit, and avoid pulling interactive overlays into unexpected server layouts.

Set NEXT_PUBLIC_SITE_URL so canonical and Open Graph URLs resolve on deploy.

FAQ

Does the Badge component work with Next.js App Router?

Yes. Import it like any other React component; keep interactive subtrees in client components when you need hooks or browser APIs, and leave static structure in server components where possible.

Can I customize badge with Tailwind CSS?

Zentauri UI exposes class-friendly variants and slots so you can extend styles with Tailwind utilities without fighting inline styles.

Is this Badge implementation accessible by default?

Primitives follow sensible defaults, but accessibility depends on how you label controls, manage focus, and wire keyboard handlers in your app. Validate critical flows with keyboard-only use and screen readers.