Skip to content
SevenUI
Sign in
On this page

Badge

Displays a small status descriptor, with default, secondary, destructive, outline, ghost, and link variants that can render as a link.

DefaultSecondaryOutlineDestructiveGhostLink

Installation

Bash

Usage

Examples

Render the badge as a real anchor via the render prop — hover styles for links are built into each variant.

With icon

A direct svg child is sized automatically.

Verified4.9Build failed

Processing

DeployingIndexing

API reference

Badge

Renders a span by default; swap the element with the Base UI render prop (for example render={<a href="…" />} — link hover styles are built in).

PropTypeDefault
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link""default"
renderReact.ReactElementspan

badgeVariants is also exported for styling custom elements.

Was this page helpful?