Search results

Change Size in Blazor Toggle Switch Button component

03 Aug 2021 / 1 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.

Copied to clipboard
@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;

Output be like

Switch Sample