Indicator <pm-indicator>
Count or dot on the corner of an icon, button or avatar: unread notifications, messages, cart items, status.
Sizes
Set with the size attribute; controls keep touch-sized targets on phones.
size="sm"size="md"size="lg"Tones
Set tone on the element, or data-tone on any ancestor to tone a whole area.
tone="accent"tone="secondary"tone="neutral"tone="success"tone="warning"tone="danger"tone="info"Overview
Wraps one element. count shows a number (max caps it: 120 → "99+"); dot shows a dot instead. Nothing shows at 0 unless show-zero. The badge is visual; its meaning reaches screen readers as the wrapped control's description, from label ({count} is filled in), e.g. "Notifications, 3 unread". live also announces changes.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
count | number | — | Number to show. |
max | number | 99 | Highest number shown before "+" (default 99; 0 = no cap). |
dot | boolean | false | Show a dot instead of a number (with or without count). |
show-zeroprop: showZero | boolean | false | Keep showing the badge when count is 0. |
placement | 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | — | Corner: top-end (default), top-start, bottom-end or bottom-start. |
label | string | — | Screen reader description; {count} is filled in (default "{count} new", or "New" for a dot). |
pulse | boolean | false | Pulse to draw attention (off when the user prefers reduced motion). |
live | boolean | false | Announce count changes politely to screen readers. |
size | 'sm' | 'md' | 'lg' | — | Badge size. |
overlap | 'box' | 'icon' | 'circle' | — | What the badge sits on: box hangs it off the corner, icon puts it on the corner of the icon inside an icon
button (it stays inside the button), circle on the edge of a round avatar. Worked out from the wrapped
element when left off. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Slots
| Slot | Description |
|---|---|
(default) | The element to decorate (one). |
CSS parts
| Part | Description |
|---|---|
::part(badge) | The count or dot. |
Used in templates
Overview dashboardTraffic analyticsOrdersCustomer 360InboxTeam chatAI assistantNotificationsProject boardTeam and rolesBilling and invoicesUser profileAccount settingsProduct pageShopping cartCheckout