---
title: "Badge"
description: "A small label for status, counts, and tags, in default, secondary, outline, ghost, destructive, and link variants. Renders as any element."
plan: Free
docs: https://ui.edbn.me/docs/components/badge
---

# Badge

A small label for status, counts, and tags, in default, secondary, outline, ghost, destructive, and link variants. Renders as any element.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/badge.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0, class-variance-authority@^0.7.1
- edbn: edbn-base

## Usage

```tsx examples/badge-basic.tsx
"use client";
import { Badge, BadgeDot } from "@/components/ui/badge";

export default function BadgeBasicPreview() {
  return (
    <div className="flex items-center gap-2">
      <Badge>New</Badge>
      <Badge variant="outline">Beta</Badge>
      <Badge size="count">3</Badge>
      <BadgeDot label="Unread" />
    </div>
  );
}
```

## Files
- components/ui/badge.tsx (104 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
