Skip to content
+

Badge

The Badge component generates a small label that is attached to its child element.

useBadge API

Import

import { useBadge } from '@mui/base/useBadge';
// or
import { useBadge } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Parameters

badgeContent

invisible

max

showZero

Return value

badgeContent

displayValue

invisible

max