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.
anystring | FlattenedPaletteBackground color of the badge, sets an accessible text color
FunctiononClick={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 | stringThe size of the radius. (Default is 3px).
ReactReactNodeAllows rendering any content inside the beginning of the badge.
ReactReactNodeAllows rendering any content inside the end of the badge.
'xs' | 'sm' | 'md' | 'lg' | 'xl'Size of badge
booleanUses a 1:1 padding ratio, useful for icon only badges.
stringThe text to be rendered