# Switch > An on / off toggle with an optional label. Source: https://native.shellui.dev/docs/components/form/switch ## Installation ```bash shellui-native add switch ``` **Platforms:** MAUI · Avalonia. ## Usage ### Basic **MAUI** ```xml ``` **Avalonia** ```xml ``` [Live preview](https://native.shellui.dev/preview/index.html?c=switch-basic) ## API | Property | Type | Default | Description | |---|---|---|---| | `IsToggled` | `bool` | `false` | Whether it's on. Two-way bindable. | | `Label` | `string` | — | Text next to the control; clicking it toggles the control. | | Event | Arguments | Description | |---|---|---| | `Toggled` | `bool` | User input only: setting IsToggled from code or a binding doesn't raise it. |