Search results

Label and Size

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.

tagHelper
label.cs
@section ControlsSection{
    <ejs-checkbox id="cbox1" label="Left Side Label" labelPosition="before"></ejs-checkbox>
    <ejs-checkbox id="cbox2" label="Right Side Label" labelPosition="after" checked="true"></ejs-checkbox>
}

<style>

.e-checkbox-wrapper {
  margin-top: 18px;
}

li {
  list-style: none;
}

</style>
public ActionResult Label()
{
    return View();
}

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.

tagHelper
size.cs
@section ControlsSection{
    <ejs-checkbox id="cbox1" label="Small" cssClass="e-small"></ejs-checkbox>
    <ejs-checkbox id="cbox2" label="Default"></ejs-checkbox>
}

<style>

.e-checkbox-wrapper {
  margin-top: 18px;
}

li {
  list-style: none;
}

</style>
public ActionResult Size()
{
    return View();
}

See Also

Contents
Contents