Skip to content

ModalCommandsRenderMode

The way ModalCommandBuilder.build renders each control.

Import:

import type { ModalCommandsRenderMode } from '@mnaoumov/obsidian-lib/modals/modal-command-builder';

Signature:

export enum ModalCommandsRenderMode

Members:

Member Value Description
Buttons 'buttons' One clickable button per control, carrying its pressed (aria-pressed) and disabled state. Only controls reachable by pointer are rendered — checkboxes, and keyboard commands that supply KeyboardCommand.onActivate. A hint-only or keyboard-only command still registers its handler but renders no button, because a button nobody can press is worse than no button. A dropdown throws: a control that CYCLES has no button form.
Instructions 'instructions' Obsidian’s instruction-bar look: the shortcut, then the purpose text with an inline checkbox or dropdown.

Links to this page: