CheckboxCommand
A checkbox command shown in a SuggestModal’s instruction bar and bound to a modifier+key shortcut that toggles it.
Import:
import type { CheckboxCommand } from 'obsidian-dev-utils/obsidian/modals/suggest-modal-command-builder';Signature:
export interface CheckboxCommandProperties
| Property | Type | Description |
|---|---|---|
| key | string | The key that toggles the checkbox. |
| modifiers? | Modifier[] | The modifiers combined with CheckboxCommand.key to toggle the checkbox. When omitted, no modifiers are required. |
| purpose | string | The human-readable description shown next to the checkbox in the instruction bar. |
Methods
| Method | Returns | Description |
|---|---|---|
| onChange(value) | void | Called when the checkbox value changes. |
| onInit(checkboxEl) | void | Called once with the created checkbox element, to initialize its state. |