Search results

Label and Size in Blazor CheckBox component

This section explains the different sizes and labels.

Label

The Checkbox caption can be defined by using the Label property. This reduces the manual addition of label for Checkbox. You can customize the label position before or after the Checkbox through the LabelPosition property.

@using Syncfusion.Blazor.Buttons

<SfCheckBox Label="Left Side Label" LabelPosition="LabelPosition.Before" Checked="true"></SfCheckBox><br />
<SfCheckBox Label="Right Side Label" LabelPosition="LabelPosition.After" Checked="true"></SfCheckBox>

Output be like

Button Sample

Size

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

@using Syncfusion.Blazor.Buttons

<SfCheckBox Label="Small" CssClass="e-small"></SfCheckBox><br />
<SfCheckBox Label="Default"></SfCheckBox>

<style>
    .e-checkbox-wrapper {
        margin-top: 18px;
    }
</style>

Output be like

Button Sample

See Also

Contents
Contents