Badge

Badge

Displays a badge or a component that looks like a badge.

Variants

Four badge variants for different use cases.

Default
Secondary
Destructive
Outline

Usage Examples

Common use cases for badges.

Status Indicators

Active:
Active
Pending:
Pending
Error:
Error
Draft:
Draft

Notification Counts

Messages
3
Unread
12
Completed
24

Tags/Labels

React
TypeScript
Tailwind CSS
Blazor
C#

Feature Flags

New Feature
NEW
Beta
BETA
Deprecated
DEPRECATED

In Lists

Badges combined with other components.

Project Alpha

Active development

In Progress

Project Beta

Under review

Review

Project Gamma

Deployment failed

Failed

Project Delta

Planning phase

Draft

With Icons

Badges can include icons or other content.

Verified
Closed
Featured
Favorite

Custom Styling

Override styles with the Class parameter.

Large Badge
Square Corners
Custom Color
Gradient

Accessibility Notes

Best practices for using badges accessibly.

Keep text concise: Badges work best with 1-2 words or small numbers.

Meaningful content: Badge text should be self-explanatory.

Color alone: Don't rely solely on color to convey meaning. Include text.

Context: Ensure the badge's meaning is clear from surrounding content.

API Reference

Component parameters and their types.

Prop Type Default Description
Variant BadgeVariant Default Visual style variant. Options: Default, Secondary, Destructive, Outline.
Class string? Additional CSS classes to apply to the badge element.
ChildContent RenderFragment? The content to display inside the badge (text, icons, numbers, etc.).

Reconnecting...

Attempting to rejoin the server

Connection Lost

Retrying in seconds

Connection Failed

Failed to rejoin the server.
Please retry or reload the page.

Session Paused

The session has been paused by the server

Resume Failed

Failed to resume the session.
Please reload the page.