Badge Container

The BadgeContainer component allows you to target text, HTML elements or React components that cannot have children, by wrapping both the targeted element and the Badge inside a BadgeContainer component.

When using the Badge component without the BadgeContainer component, make sure the HTML element or React component that contains a badge has css position other than static and allows overflow content. The following example demonstrates both approaches in action.

View Source
Change Theme:

In this article

Not finding the help you need?