Skip to Content
Liquid Glass UI
Components

Badge

Responsive Apple Liquid Glass pill badge preserving all 6 shadcn semantic variants with Liquid Glass enabled by default, dynamic accent tinting, and glass={false} solid fallback.

Fully compatible with the standard shadcn/ui JSX API (<Badge>, supporting polymorphic render such as <a>), preserving all 6 semantic variants with Apple Liquid Glass and dynamic accent colors enabled out of the box:

  • Full-pill silhouette: Consistently uses rounded-full with sm, default, and lg responsive sizes.
  • Default Liquid Glass: Enabled by default (glass={true}), reacting live to the global Glass Tint and Accent Color; pass glass={false} anytime for a high-contrast solid badge.

All Semantic Variants

Switch the Accent Color and Glass Tint in the left sidebar to see every variant respond in real time:

apple-liquid-ui/preview/badge-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/badge

Size Scale

Available in sm, default, and lg capsule sizes:

apple-liquid-ui/preview/badge-sizes
MacBook · 16:10

Usage

import { Badge } from '@/components/ui/badge';

export function Example() {
  return (
    <div className="flex gap-2">
      <Badge>Liquid Glass</Badge>
      <Badge variant="secondary">macOS 27</Badge>
      <Badge variant="destructive">Update Required</Badge>
    </div>
  );
}

Props API

PropTypeDefaultDescription
variant'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link''default'Standard 6 shadcn semantic variants (default and link follow the global accent color)
size'sm' | 'default' | 'lg''default'Capsule size scale
glassbooleantrueLiquid Glass control material; false renders the 100% opaque Bordered equivalent
renderReactElement—Base UI polymorphic rendering, e.g. render={<a href="..." />}

On this page