Badge

Presents users with short, relevant information.

To implement Badge component into your project you’ll need to add the import:

import Badge from "@kiwicom/orbit-components/lib/Badge";

After adding import into your project you can use it simply like:

<Badge>Hello!</Badge>

Table below contains all types of the props available in Badge component.

NameTypeDefaultDescription
childrenReact.NodeThe content of the Badge.
dataTeststringOptional prop for testing purposes.
iconReact.NodeThe displayed icon on the left.
typeenum"neutral"The color type of the Badge.
ariaLabelstringAdds prop adds aria-label to an element, useful for screenreaders.
type
"neutral"
"dark"
"info"
"success"
"warning"
"critical"
"infoInverted"
"criticalInverted"
"successInverted"
"warningInverted"
  • If you want to use circled badge, please take a look on NotificationBadge.