Skip to content

@jsvision/ui / SwitchOptions

Interface: SwitchOptions

Defined in: ui/src/controls/switch.ts:36

Construction options for a Switch.

Properties

disabled?

optional disabled?: boolean

Defined in: ui/src/controls/switch.ts:46

Non-interactive and dim when true (also not focusable).


label?

optional label?: string

Defined in: ui/src/controls/switch.ts:40

Optional caption drawn left of the track; ~X~ marks an Alt+hotkey.


offLabel?

optional offLabel?: string

Defined in: ui/src/controls/switch.ts:44

Text shown right of the track when off (default 'Off'); '' hides it.


onLabel?

optional onLabel?: string

Defined in: ui/src/controls/switch.ts:42

Text shown right of the track when on (default 'On'); '' hides it.


value

value: Signal<boolean>

Defined in: ui/src/controls/switch.ts:38

Two-way bound on/off state: reading renders the knob; an external write repaints.