# SbBadge A small status indicator that displays a count or dot to draw attention to an element. Commonly used for notification counts, status indicators, or labeling items. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Value | int? | null | Numeric value to display in the badge | | Max | int | 99 | Maximum value before showing "max+" (e.g., "99+") | | Dot | bool | false | When true, shows as a small dot without value | | Color | SbColor | Primary | Badge color theme | | AriaLabel | string? | null | Accessible label for screen readers | | Class | string? | null | Additional CSS classes | | Style | string? | null | Inline styles | | AdditionalAttributes | Dictionary? | null | Additional HTML attributes | ## Templates / Slots | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment? | Custom content to display inside the badge (takes precedence over Value) | ### Template Usage ```razor Custom Content ``` ## CSS Classes - `sb-badge` - Base class - `sb-badge--primary` - Primary color - `sb-badge--secondary` - Secondary color - `sb-badge--success` - Success color - `sb-badge--warning` - Warning color - `sb-badge--danger` - Danger color - `sb-badge--dot` - Dot variant (no text) ## Accessibility - Uses `aria-label` for screen reader description - Content is visible to assistive technologies ## Examples ### Basic Badge with Value ```razor @* Shows "99+" *@ ``` ### Different Colors ```razor ``` ### Dot Badge ```razor ``` ### With Custom Content ```razor NEW BETA ``` ### Badge on Element ```razor
``` ### With Accessibility ```razor ```