Telerik UI for ASP.NET Core Switch Basic Usage
- EXAMPLE
- VIEW SOURCE
-
Change Theme
defaultDefault Theme
- Main
- Main Dark
- Nordic
- Ocean Blue
- Ocean Blue A11Y
- Purple
- Turquoise
Bootstrap Theme- Main
- Bootstrap 3
- Bootstrap 3 Dark
- Main Dark
- Nordic
- Turquoise
- Turquoise Dark
- Urban
- Vintage
Material Theme- Main
- Arctic
- Lime Dark
- Main Dark
- Nova
Classic Theme- Main
- Green
- Green Dark
- Lavender
- Lavender Dark
- Main Dark
- Metro
- Metro Dark
- Moonlight
- Opal
- Opal Dark
- Silver
- Silver Dark
- Uniform
Fluent Theme- Main
Also available for:
CLIENT-SIDE API HTML HELPER APIThe Switch component is part of Telerik UI for ASP.NET Core, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Description
The Telerik UI for ASP.NET Core Switch is a component that displays two exclusive choices–checked and unchecked. Also known as a Toggle button, the Switch control supports configuration options for easy customization.
The current example displays a common use-case scenario for a Switch component.
The ASP.NET Core Switch control is part of Telerik UI for ASP.NET Core, a professional-grade UI library with 110+ components for building modern and feature-rich web applications. The Switch is a server-side wrapper for the Kendo UI for jQuery Switch component and supports an HtmlHelper and a TagHelper mode.
Functionality and Features
- Label messages—Define the texts of the checked and unchecked Switch labels.
- Enabled, disabled, and readonly state—Choose to enable, disable, or make the Switch read-only. For example, if you may want to disable the input for non-authorized users.
- Bind-value and valueSet and get the Switch value, and use the
SwitchFor()
configuration to bind the component to aModel
property. - Appearance—Set the size and radius of the track and thumb border.
- API—Use the API functions to dynamically change the state of the Switch.
- Accessibility, keyboard navigation, and RTL support—The Switch is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation. The component also enables you to render it in a right-to-left direction.