Blazor Toolkit Switch Component
A toggle component used for enabling and disabling options. Ideal for settings, preferences, and binary selections.
Basic Usage
The simplest way to use SfSwitch is through bind-Checked property for two‑way binding.
Value Binding
You can control the switch using either Checked or CheckedChanged events, depending on your binding style.
Labels
The Switch component supports both external labels and built‑in state labels.
External labels (using the label element) describe what the switch controls.
Built‑in labels, configured using the OnLabel and OffLabel properties, display text inside the switch to indicate its ON or OFF state.
States
The switch can render in multiple states, including interactive and disabled modes. You can control availability using Disabled property
Form Validation
The switch integrates seamlessly with EditForm and Blazor validation.