Browse API 1 documentation
grove.badges.set()
Replace status-bar indicators published by the instance.
Mango 3.1+View Markdown
Replace status-bar indicators published by the instance.
Signature
ts
grove.badges.set(badges: {
id: string; icon?: string; text?: string; subtitle?: string
color?: 'neutral' | 'accent' | 'success' | 'warning' | 'danger'
}[]): void
Availability
IRC-bound runtimes and application Roots with statusbar. Composer utilities and settings pages cannot publish persistent status UI.
Parameters
| Parameter | Required | Description |
|---|---|---|
badges |
Yes | Complete replacement array; [] clears it. |
id |
Yes | Nonempty local ID, trimmed and capped at 64 characters. |
icon |
At least icon or text | SF Symbol name; single-line, capped at 64 characters. |
text |
At least icon or text | Single-line text, capped at 32 characters. |
subtitle |
No | Secondary label, single-line and capped at 32 characters. |
color |
No | Semantic tint; default/unknown neutral. |
Return value
Returns undefined.
Behavior and errors
Mango inspects at most 32 candidates and retains at most four valid unique badges per instance. First duplicate ID wins. Badges appear in shared chrome with host attribution, and disappear when their instance stops. The app collapses logical duplicates from instances of the same extension with the same badge id.
Example
js
grove.badges.set([{ id: 'service', icon: 'checkmark.circle', text: 'Ready', color: 'success' }])
// Clear the entire list:
grove.badges.set([])