Change Size in Blazor Toggle Switch Button Component

14 Oct 20221 minute to read

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

@using Syncfusion.Blazor.Buttons

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

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

Changing Size of Blazor Toggle Switch Button