Wrap the host, and put the mark inside it.
The sample also uses Button. One command adds them with this item:
inbox-button.tsx
Indicator
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| side | "bottom-end""bottom-start""top-end""top-start" | "top-end" | |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
IndicatorBadge
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| side | "bottom-end""bottom-start""top-end""top-start" | — | |
| count | number | — | The number to show. 0 (and a value under 0 or NaN, which count as 0) hides the badge, unless showZero. |
| max | number | 99 | The largest number to show. A larger count shows as max and a plus: "99+". Default 99. |
| show | boolean | false | Show the badge with "0" when count is 0. Default false: no news, no mark. |
| locale | string | — | The BCP 47 locale of the digits ("ar-EG" gives "٣"). Default: the DisplayLocaleProvider locale, else "en-US" (useDisplayLocale), so the server and the browser write the same digits. |
| format | NumberFormatOptions | — | Intl.NumberFormat options, for example { notation: "compact" } with a large max. An object written inline is safe: the page cache (numberFormats) keys a formatter by its options, so equal options reuse one formatter. |
| format | appendPlus | The text over max, from max in the locale digits. Default: the number and a plus after it ((max) => \${max}+\`). Pass another form for a locale that writes "or more" in another way ((max) => \≥${max}\`). | |
| animated | boolean | true | Animate a change of the count: the digits roll (up for more, down for fewer), and a count that goes up pops the badge once. Over max the text stays and nothing moves. Default true. false swaps the text at once. |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
IndicatorDot
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| pulse | boolean | — | |
| size | "default""sm" | — | |
| tone | "destructive""info""neutral""success""warning" | — | |
| variant | "default""muted""ring" | — | |
| side | "bottom-end""bottom-start""top-end""top-start" | — | |
| shown | boolean | — | Shows or hides the dot with the badge motion: in on the fade clock (opacity and a scale from 0.9), out on fadeExit. A dot that shows when the page first renders shows at once. Leave it out to keep the dot always there (no motion).: the unread dot of the What's New Notice pops in when news arrives and leaves when the news is opened. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
Built with
Installs with Indicator
- Components
- Dot,Rolling Number





