🚀ReacUI is currently in Beta. We're actively improving it! ❣️
Badge
A lightweight component for status indicators, counts, and labels
PrimarySecondarySuccessDanger
Installation
The Badge component is part of the ReacUI library. Install the package to use it in your project.
Import
Import the Badge component into your React component.
Badge Variants
ReacUI badges come in several variants to accommodate different statuses and contexts.
PrimarySecondarySuccessDangerWarningInfo
Badge Sizes
Control the size of badges using the size prop.
SmallMediumLarge
API Reference
The following props are available for the Badge component.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | The content of the badge. |
| variant | string | 'primary' | The badge variant: 'primary', 'secondary', 'success', 'danger', 'warning', or 'info'. |
| size | string | 'md' | The badge size: 'sm', 'md', or 'lg'. |
| className | string | '' | Additional CSS classes to add to the badge. |