Skip to content

@jsvision/ui / ButtonOptions

Interface: ButtonOptions ​

Defined in: ui/src/controls/button.ts:21

Options for Button.

Properties ​

command? ​

optional command?: string

Defined in: ui/src/controls/button.ts:23

A command name emitted when the button is activated. Handle it from a menu/status/app handler.


default? ​

optional default?: boolean

Defined in: ui/src/controls/button.ts:27

Marks this as the dialog's default button: it also activates on Enter when the key is unconsumed.


disabled? ​

optional disabled?: boolean | (() => boolean)

Defined in: ui/src/controls/button.ts:29

Greyed out and inert. Pass a getter to re-evaluate reactively when the signals it reads change.


onClick? ​

optional onClick?: () => void

Defined in: ui/src/controls/button.ts:25

A callback fired when the button is activated, in addition to (or instead of) command.

Returns ​

void