Skip to content

menu

Helpers for Obsidian menus.

Interface Description
AddSingleChoiceMenuItemsParams Parameters for addSingleChoiceMenuItems.
SingleChoiceMenuOption One choice of a single-choice menu group.
Function Description
addSingleChoiceMenuItems Adds a group of menu items of which exactly one is checked, like radio buttons. A click checks the clicked item and unchecks the rest of the group before calling onChange, so a menu that is shown again shows the new choice. Obsidian still closes the menu after a click (read from its 1.15.0 MenuItem.handleEvent). Values are compared with ===.