Files
electron/docs/api/structures/menu-item-badge.md
Shelley Vohr c7fb0d30a1 feat: add menuItem.badge support on macOS
Adds a `badge` property to `MenuItem` on macOS, backed by AppKit's `NSMenuItemBadge` API (macOS 14+). The property accepts a `MenuItemBadge` object with a `type` (`alerts`, `updates`, `new-items`, or `none`) and an optional `count` or custom `content` string.

The badge can be set at construction time or updated dynamically after the item has been added to a menu.
2026-04-08 14:46:48 +02:00

342 B

MenuItemBadge Object

  • type string (optional) - Can be one of alerts, updates, new-items or none. Default is none.
  • count number (optional) - The number of items the badge displays. Cannot be used with type: 'none'.
  • content string (optional) - A custom string to display in the badge. Only usable with type: 'none'.