@jsvision/ui / SwitchOptions
Interface: SwitchOptions
Defined in: ui/src/controls/switch.ts:38
Construction options for a Switch.
Properties
disabled?
optionaldisabled?:boolean
Defined in: ui/src/controls/switch.ts:50
Non-interactive and dim when true (also not focusable).
i18n?
readonlyoptionali18n?:I18n
Defined in: ui/src/controls/switch.ts:40
Explicit translation service for default state words.
label?
optionallabel?:string
Defined in: ui/src/controls/switch.ts:44
Optional caption drawn left of the track; ~X~ marks an Alt+hotkey.
offLabel?
optionaloffLabel?:string
Defined in: ui/src/controls/switch.ts:48
Text shown right of the track when off (default 'Off'); '' hides it.
onLabel?
optionalonLabel?:string
Defined in: ui/src/controls/switch.ts:46
Text shown right of the track when on (default 'On'); '' hides it.
value
value:
Signal<boolean>
Defined in: ui/src/controls/switch.ts:42
Two-way bound on/off state: reading renders the knob; an external write repaints.