Skip to content

ElectronMessageBoxOptions

Unofficial

Options for Electron message box dialog.

Import:

import type { ElectronMessageBoxOptions } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronMessageBoxOptions

Properties

Property Type Description
buttons? string[] The array of button labels. On Windows, an empty array will result in one button labeled OK.
cancelId? number The index of the button to be used to cancel the dialog.
checkboxChecked? boolean The initial checked state of the checkbox.
checkboxLabel? string The label for the checkbox.
defaultId? number The index of the button that is selected by default.
detail? string Extra information about the message.
icon? ElectronNativeImage | string The icon to display in the message box.
message string The content of the message box.
noLink? boolean Whether to set the no link flag for the message box on Windows.
normalizeAccessKeys? boolean Whether to normalize keyboard access keys across platforms.
signal? AbortSignal An AbortSignal to optionally close the message box, behaving as if it was cancelled by the user.
textWidth? number Custom width of the text in the message box (macOS only).
title? string The title of the message box.
type? 'error' | 'info' | 'none' | 'question' | 'warning' The type of the message box.