niceui

Badge

Compact status labels in neutral, sky and outline variants, with an optional glowing status dot.

ReactTailwind CSSTypeScriptData displayMIT · Free
LiveDraftArchived

Installation

01

Install with the shadcn CLI.

$ npx shadcn@latest add https://niceui.dev/r/badge.json
02

Or copy the source manually into components/ui/badge.tsx. No extra dependencies.

Usage

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

export default function Example() {
  return (
    <div className="flex gap-1.5">
      <Badge variant="sky" dot>Live</Badge>
      <Badge>Draft</Badge>
      <Badge variant="outline">Archived</Badge>
    </div>
  );
}

For AI assistants

This page is also available as Markdown and as a shadcn registry item. Use Copy prompt to hand the full source to Claude, Cursor or v0.