Appearance
The ToggleButton provides predefined appearance options such as different sizes, border radiuses, fill modes, and theme colors.
For a complete example, refer to the Appearance Demo of the ToggleButton.
Options
The ToggleButton HtmlHelper provides the following methods for styling:
Size()—configures the overall size of the component.ThemeColor()—configures what color will be applied to the component.FillMode()—defines how the color is applied to the ToggleButton.Rounded()—determines the border radius of the component.
Size
To control the size of the ToggleButton, configure the Size option with any of the following values:
SmallMediumLarge
When not explicitly set, the applied theme controls the default size.
The
Nonevalue is deprecated. Use custom CSS instead.
@(Html.Kendo().ToggleButton()
.Name("toggleButton")
.Size(ComponentSize.Medium)
.Content("Text ToggleButton")
)
FillMode
The FillMode() method specifies how the color is applied to the component.
@(Html.Kendo().ToggleButton()
.Name("toggleButton")
.FillMode(ButtonFillMode.Solid)
.Content("Text ToggleButton")
)
The following options are available for the FillMode configuration:
SolidOutlineFlatLink
When not explicitly set, the applied theme controls the default fill mode.
The
Nonevalue is deprecated. Use custom CSS instead.
ThemeColor
The ThemeColor configuration provides a variety of colors that can be applied to the ToggleButton. The available options are:
BasePrimarySecondaryTertiaryInfoSuccessWarningErrorDarkLightInverse
When not explicitly set, the applied theme controls the default theme color.
@(Html.Kendo().ToggleButton()
.Name("toggleButton")
.ThemeColor(ThemeColor.Base)
.Content("Text ToggleButton")
)
Rounded
The border radius of the ToggleButton can be customized through the Rounded() method.
@(Html.Kendo().ToggleButtonButton()
.Name("toggleButton")
.Rounded(ButtonRounded.Medium)
.Content("Text ToggleButton")
)
The following values are available for the Rounded option:
SmallMediumLargeFull
When not explicitly set, the applied theme controls the default border radius.
The
Nonevalue is deprecated. Use custom CSS instead.