Badge
Badge component to display concise information.
Badge Props
Prop | Type | Default |
---|---|---|
variant | "accent" | "warning" | "danger" | "success" | "neutral" | "gradient" | "accent" |
size | "micro" | "small" | "regular" | "small" |
icon | ReactNode | - |
screenReaderText | string | - |
children | ReactNode | - |
className | string | - |
Examples
Variant
Choose between different variants to convey different meanings or importance levels. Default variant is accent
.
Size
The Badge component supports three sizes to accommodate various layout requirements. Default size is small
.
With Icon
Badges can include an icon to provide additional visual context. By default there is no icon.
Accessibility
The Badge component includes screen reader support through the screenReaderText
prop, only be announced to screen readers. By default no text is passed to screenReaderText
prop.