Badge
99+
An element to display shortened numbers - usually an alert or notification count on top of menu icons.
The count number is shortened to maxDigits
length by rounding to the last retained digit. Additionally, it may have a corresponding letter appended.
Props
Prop | Type | Default | Description |
---|---|---|---|
count | Number | Required | Badge count |
maxDigits | Number |
| Maximum number of count digits to display |
Examples
Example
1
Badge for a number of 1000
1k
Badge for a number of 1234567
1.2M
Badge for 1234567 with max one digit
1M
Custom Badge style
5