You only have access to FOUR variants: default, secondary, outline, and destructive

Code

import { Badge } from "@trytoolify/ui/badge";

export function BadgeDemo() {
    return <Badge>Badge</Badge>;
}

Usage

import { Badge } from "@trytoolify/ui/badge";
<Badge variant="outline">Badge</Badge>

You can use the badgeVariants helper to create a link that looks like a badge.

import { badgeVariants } from "@trytoolify/ui/badge";
<Link className={badgeVariants({ variant: "outline" })}>Badge</Link>

Examples

Default

import { Badge } from "@trytoolify/ui/badge";

export function BadgeDemo() {
    return <Badge>Badge</Badge>;
}

Secondary

import { Badge } from "@trytoolify/ui/badge";

export function BadgeSecondary() {
    return <Badge variant="secondary">Secondary</Badge>;
}

Outline

import { Badge } from "@trytoolify/ui/badge";

export function BadgeOutline() {
    return <Badge variant="outline">Outline</Badge>;
}

Destructive

import { Badge } from "@trytoolify/ui/badge";

export function BadgeDestructive() {
    return <Badge variant="destructive">Destructive</Badge>;
}