# ASP.NET Core Switch Overview

The Telerik UI Switch TagHelper and HtmlHelper for ASP.NET Core are server-side wrappers for the Kendo UI Switch widget.

The Switch displays two exclusive choices, and when initialized, the Switch renders the currently selected value.

* [Demo page for the Switch](https://demos.telerik.com/aspnet-core/switch/index)

> By default, the labels of the Switch are not visible when using Bootstrap or Material themes.

## Initializing the Switch

The following example demonstrates how to define the Switch.

```Razor HtmlHelper
    @(Html.Kendo().Switch()
        .Name("switch") // The name of the Switch is mandatory. It specifies the "id" attribute of the widget.
        .Checked(true)
    )
```

```Razor TagHelper
    <kendo-switch name="switch"
            checked="true">
    </kendo-switch>
```

## Basic Configuration

The configuration options of the Switch are passed as attributes.

```Razor HtmlHelper
    @(Html.Kendo().Switch()
        .Name("switch")
        .Checked(true)
        .Enabled(true))
```

```Razor TagHelper
    <kendo-switch name="switch"
            checked="true"
            enabled="true">
    </kendo-switch>
```

## Functionality and Features

* [Appearance](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/switch/appearance)—The Switch enables you to customize its appearance based on your requirements.
* [Events](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/switch/events)—The Switch allows you to handle its events and implement custom functionality.
* [Accessibility](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/switch/accessibility/overview)—The Switch provides accessibility support through its keyboard navigation.

> tip To learn more about the appearance, anatomy, and accessibility of the Switch, visit the [Progress Design System documentation](https://www.telerik.com/design-system/docs/components/switch/)—an information portal offering rich component usage guidelines, descriptions of the available style variables, and globalization support details.

## Next Steps

* [Getting Started with the Switch ](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/switch/getting-started)

* [Basic Usage of the Switch for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/switch/index)

* [Switch in Razor Pages](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/editors/switch/razor-page)

## See Also

* [Basic Usage by the Switch for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/switch)
* [Using the API of the Switch for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/switch/api)
* [Server-Side API](https://www.telerik.com/aspnet-core-ui/documentation/api/switch)
