Label and Size in Check Box Control
19 Dec 20221 minute to read
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.
<ul>
<li>
<ejs-checkbox id="cbox1" label="Left Side Label" labelPosition="@Syncfusion.EJ2.Buttons.LabelPosition.Before"></ejs-checkbox>
</li>
<li>
<ejs-checkbox id="cbox2" label="Right Side Label" labelPosition="@Syncfusion.EJ2.Buttons.LabelPosition.After" checked="true"></ejs-checkbox>
</li>
</ul>
<style>
.e-checkbox-wrapper {
margin-top: 18px;
}
li {
list-style: none;
}
</style>
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
.
<ul>
<li>
<ejs-checkbox id="cbox1" label="Small" cssClass="e-small"></ejs-checkbox>
</li>
<li>
<ejs-checkbox id="cbox2" label="Default"></ejs-checkbox>
</li>
</ul>
<style>
.e-checkbox-wrapper {
margin-top: 18px;
}
li {
list-style: none;
}
</style>
NOTE