Skip to main content

Data Badge

Display a badge that spans the entire width of the parent component with a number field and text. There are two types of displays: large and medium.

Storybook Docs

Props

NameTypeDefaultDescription
childrenstring-The text is displayed to the right of the number.
colorDefaultMantineColor-The color applied to the badge, and the contrast is automatically managed by the autoContrast prop of the Badge component. If the prop is not specified, the text color will be black, and there will be no backgroundColor.
numbernumber-The number value is displayed to the left of the text. The fit-content property and a margin-right are applied to the number tag.
size"lg" | "md""md"Controls the appearance of the component. Allows switching between two templates: "md" and "lg".
rationumber -Manages the default width size of the number tag.
...--extends Badge props