Switch
An on/off switch for settings, with a thumb that springs across when tapped.
Installation
Usage
src/app/app.ts
- This example also uses Label.
- The track is the primary color when on and the input color when off.
- The switch is 44 by 24 pixels, set in pixels so it looks the same at any font size.
Disabled
A disabled switch dims and ignores taps.
Listen without a signal
changed emits the new state after each tap.
API
UiSwitch
UiSwitch also has a public toggle() method, which does nothing while disabled.
