Badge

A clean, customizable badge component for labels, tags, and status indicators. Built with class-variance-authority for easy variant management and featuring a modern, minimalist aesthetic with glassmorphism support.

uiclass-variance-authority

Installation

$npx futureuikit add badge

Import

import { Badge } from "@/components/ui/badge"
Layout Variant
Color Theme
Shape
Spacing

Named Keys & Props

Pass these exact named keys as props on <Badge />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
variantVisual style
"solid""secondary""outline""ghost"
shapeCorner shape
"default""square""rounded""sharp"
spacingInner spacing
"default""2x""4x""6x""8x"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { Badge } from "@/components/ui/badge";

export default function Example() {
  return (
    <div className="flex flex-wrap gap-2">
      <Badge variant="solid" color="default">New</Badge>
      <Badge variant="secondary" color="blue">Feature</Badge>
      <Badge variant="solid" color="rose">Alert</Badge>
      <Badge variant="outline" color="emerald">Ready</Badge>
      <Badge variant="ghost" color="indigo">Beta</Badge>
    </div>
  );
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆Built with React and class-variance-authority for scalable styling.
  • ◆Supports multiple variants: Default (Glass), Secondary, Destructive, and Outline.
  • ◆Modern, minimalist design with uppercase tracking for a premium feel.
  • ◆Fully customizable via standard HTML attributes and Tailwind classes.
  • ◆Lightweight and optimized for high-density information displays.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Install: Run'npx futureuikit add badge'.
  • ◆Import:'import { Badge } from "@/components/ui/badge";'
  • ◆Variants & Colors: Combine 'variant' ('solid', 'secondary', 'outline', 'ghost') with any of the 10 named 'color' keys.
  • ◆Styling: Use Tailwind classes in'className'for custom padding, colors, or rounded corners.
  • ◆Hierarchy: Best used for metadata, status updates, or categorical tags.