ComponentsBadge

Badge

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

Usage
import { HvBadge } from "@hitachivantara/uikit-react-core";
Source
Package

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 text with the badge you can use the text prop along with the textVariant prop to specify the typography variant to use.

Events
Events

Events

8

Events

88

Events

99+

Events

100%

Controlled count

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

Events

1

Accessibility

If you want to specify a custom aria-label, use the role prop.

Events

25