Componentfeedback0.36 KB gzipZero dependencies

Badge

Micro status pill with subtle entrance transition.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add badge

Or install the full npm package:

npm install bigbullui

Usage

tsx4 lines
import { Badge } from "@/components/ui/badge"; <Badge>New</Badge><Badge variant="accent">Accent</Badge>

Source code

badge.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxbadge.tsx29 lines
import * as React from "react";import { cn } from "./lib/utils"; type Variant = "default" | "secondary" | "outline" | "accent"; export type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & { variant?: Variant }; const variants: Record<Variant, string> = {  default: "border-2 border-dashed border-foreground bg-transparent text-foreground",  secondary: "border-transparent bg-secondary text-secondary-foreground",  outline: "border border-foreground/60 text-foreground",  accent: "border-transparent bg-accent text-accent-foreground",}; function Badge({ className, variant = "default", ...props }: BadgeProps) {  return (    <span      className={cn(

Props

PropTypeDescription
variantVariantVisual style.