@jsvision/ui / SwitchOptions
Interface: SwitchOptions
Defined in: ui/src/controls/switch.ts:36
Construction options for a Switch.
Properties
disabled?
optionaldisabled?:boolean
Defined in: ui/src/controls/switch.ts:46
Non-interactive and dim when true (also not focusable).
label?
optionallabel?:string
Defined in: ui/src/controls/switch.ts:40
Optional caption drawn left of the track; ~X~ marks an Alt+hotkey.
offLabel?
optionaloffLabel?:string
Defined in: ui/src/controls/switch.ts:44
Text shown right of the track when off (default 'Off'); '' hides it.
onLabel?
optionalonLabel?: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.