Feedback & indicatorsBadge Badge
Use badges to highlight an item's status for quick recognition.
BadgeProps
| Prop | Type | Required | Default | Description |
|---|
label | string | Yes | — | The label of the badge. |
size | BadgeSizexsmall|small|medium
| — | medium | The size of the badge. |
tone | BadgeToneColorsprimary|primary-inverse|secondary|secondary-inverse|neutral|neutral-inverse|critical|critical-inverse|positive|cautious|informative|disabled
| — | neutral | The tone of the badge. |
weight | WeightTypebold|subtle|text
| — | subtle | The visual "weight" of the badge. |
Also accepts DisallowStyleProps, ValidBoxProps |
IndicatorDotProps
| Prop | Type | Required | Default | Description |
|---|
'aria-label' | string | — | — | When the intent isn't provided by text, you must supply an "aria-label" for
assistive tech users. |
size | xsmall|small|medium
| — | medium | — |
tone | IndicatorToneColorsprimary|neutral|critical|positive|cautious|informative|disabled
| Yes | — | — |
Also accepts DisallowStyleProps |
NotificationBadgeProps
| Prop | Type | Required | Default | Description |
|---|
max | number | — | — | Optional cap value for the badge.
When the `value` is greater than the `max` prop, a "+" will automatically be appended. |
tone | BadgeToneColorsprimary|primary-inverse|secondary|secondary-inverse|neutral|neutral-inverse|critical|critical-inverse|positive|cautious|informative|disabled
| — | — | The tone of the badge. |
value | number | Yes | — | The number displayed inside the badge. |
Also accepts DisallowStyleProps, ValidBoxProps |