A small status label drawn as an iPhone notification badge (red gel with a 2px white border), a flat graphite Mac count pill, an engraved brushed-metal plaque, or green and amber status gels.
Installation
Requires the theme. Register the @skeuomorph namespace and add @skeuomorph/skeuomorph first, as shown in the installation guide. The CLI also pulls it in as a dependency.
Without the namespace, install straight from the URL:
Usage
import { Badge } from "@/components/ui/badge"<Badge variant="default | secondary | outline | destructive | success | warning">
Badge
</Badge>Examples
Secondary
The flat graphite count pill of Mac source lists.
Secondary
Outline
An engraved brushed-metal plaque with a 10px uppercase label.
Outline
Destructive
Destructive
Success and warning
Green and amber gels for status. Pair them with text that names the state.
Link
You can use the asChild prop to make another component look like a badge. Here's an example of a link that looks like a badge.
import Link from "next/link"
import { Badge } from "@/components/ui/badge"
export function LinkAsBadge() {
return (
<Badge asChild>
<Link href="/">Badge</Link>
</Badge>
)
}