Switch
A control that allows the user to toggle between checked and not checked.
Usage
API Reference
| Input | Type | Default |
|---|---|---|
| id | string | `volt-switch-${++nextSwitchId}` |
| ariaLabel | string | '' |
| checked | boolean | false |
| disabled | boolean | false |
| Output | Type |
|---|---|
| checkedChange | boolean |
Component Source
Install via CLI:
npx @voltui/cli add switchTypeScript
Loading editor…
Copy this code to your project. The component uses ng-primitives/switch.