How to change size in Blazor Toggle Switch Button

27 Aug 20261 minute to read

The different Blazor Toggle Switch Button sizes available are default and small. To reduce the size of the default Blazor Toggle Switch Button to small, set the CssClass property to e-small.

@using Syncfusion.Blazor.Buttons

<label for='switch1'>Checked</label>
<SfSwitch Id="switch1" CssClass="e-small" @bind-Checked="isSmallChecked"></SfSwitch>
<label for='switch2'>Unchecked</label>
<SfSwitch Id="switch2" @bind-Checked="isChecked"></SfSwitch>

@code {
    private bool isSmallChecked = true;
    private bool isChecked = false;
}

Changing Size of Blazor Toggle Switch Button