Search documentation

Search the documentation and open a page.

Displays a badge or a component that looks like a badge.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/badge

Composition

Badge └── content Badge (asChild) └── custom element

Examples

Custom Color

Loading...

Default

Loading...

Filter Chips

Loading...

Inline

Loading...

Removable

Loading...

Sizes

Loading...

Status

Loading...

Variants

Loading...

With Icon

Loading...

API Reference

Badge

PropTypeDefaultDescription
size"default" | "lg""default"Sets the badge size.
variant"default" | "destructive" | "ghost" | "link" | "outline" | "secondary""default"Sets the badge's visual style.
asChildSnippet<[PropsFn<"span">]> | undefined—Replaces the default span with a custom element and forwards the badge props.

Utilities and Supporting Types

ExportAPI
badgeVariantsStyle recipe used to reuse the component variants.