# Badge > Compact status indicator using the BadgeVariant enum for visual style control. Source: https://shellui.dev/docs/v0.3/components/data-display/badge ## Overview The Badge component displays status indicators, labels, and tags. It uses the `BadgeVariant` enum to control visual style and `Shell.Cn()` for class merging. ## Installation ```bash shellui add badge ``` ## Usage ### Default Badge ```razor New ``` ### Variants The `Variant` parameter accepts a `BadgeVariant` enum value: ```razor
Default Secondary Error Outline
``` ### Status Badges ```razor @(user.IsActive ? "Active" : "Inactive") @code { private UserInfo user = new("Ada Lovelace", "ada@example.com", "https://github.com/shadcn.png", IsActive: true); record UserInfo(string Name, string Email, string AvatarUrl, bool IsActive); } ``` ### Notification Count ```razor
3
``` ### Tags ```razor
Blazor C# Tailwind
``` ### With Inline Icon ```razor ✓ Verified ``` ## API Reference | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `Variant` | `BadgeVariant` | `BadgeVariant.Default` | Visual style of the badge | | `Class` | `string?` | `null` | Additional CSS classes merged via `Shell.Cn()` | | `ChildContent` | `RenderFragment` | — | Badge label content | ### BadgeVariant Enum | Value | Description | |-------|-------------| | `Default` | Primary filled badge | | `Secondary` | Muted secondary style | | `Destructive` | Red / error style | | `Outline` | Border-only style | ## Accessibility - Rendered as an inline `` with proper semantic meaning. - High contrast colors ensure readability in all variants. - Works with screen readers when meaningful text content is provided.