Badge
View Source
Badges are used to inform users of the status of a piece of information or of an action that has been taken.
Props
Accepts StackView props.
Use the badge
key in ThemeProvider
to customize the default properties of this component.
any
string | FlattenedPalette
Background color of the badge, sets an accessible text color
Function
onClick={stopPropagationClick(onClick)}
Callback passed to stopPropagationClick
which
adds event.stopPropagation() to a component’s onClick event.
Used to prevent element’s onClick from bubbling up the tree.
number | string
The size of the radius. (Default is 3px).
ReactReactNode
Allows rendering any content inside the beginning of the badge.
ReactReactNode
Allows rendering any content inside the end of the badge.
'xs' | 'sm' | 'md' | 'lg' | 'xl'
Size of badge
boolean
Uses a 1:1 padding ratio, useful for icon only badges.
string
The text to be rendered