Skip to content

@jsvision/ui / ButtonOptions

Interface: ButtonOptions

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

Options for Button.

Properties

command?

optional command?: string

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

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:26

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:28

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:24

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

Returns

void