ComponentsBadge

Badge

The badge is a component used to notify the user that something has occurred, in the app context.

GitHub LogoSource Code
2

Icon

Use the icon prop to specify a icon to use with the badge.

8
88
99+
100%

Maximum value

Use the maxCount prop to specify the maximum value to be displayed. Above that value a ’+’ sign is displayed.

9+
99+
999+

Text

To display a badge on any content, wrap the children content with the badge component.

Events
Events

Events

8

Events

88

Events

99+

Events

100%

Controlled count

A badge sample using react hooks to set the number of events.

1

Accessibility

If you want to specify a custom aria-label, ensure the badge has a role.

25