New to Kendo UI for Angular? Start a free 30-day trial

Forms Support

Updated on Oct 14, 2026

You can use the Switch in Template-driven and Reactive forms.

Template-Driven Forms

The template-driven forms enable you to bind the value of the Switch to the forms model by using the ngModel directive.

The following example demonstrates how to use the Switch in a template-driven form.

Example
View Source
Loading ...

Reactive Forms

The FormGroup provides a way to render reactive forms. For more details, refer to the Angular Documentation.

The following example demonstrates how to use the Switch in a reactive form.

Example
View Source
Loading ...

Managing the Switch Disabled State in Reactive Forms

To disable the Switch component when working with reactive forms and Angular 15 or later, use the FormControl's disabled property/option or disable() method.

Angular 15 introduces a breaking change affecting the synchronization of setDisabledState with the model-DOM. This impacts components using the disabled attribute. As a result, the disabled property of the Kendo UI for Angular components used prior to Angular 15 is no longer working in reactive forms.

Example
View Source
Loading ...

FormField Association

The Kendo UI for Angular FormField component enables you to group form-related elements, such as inputs, labels, hint and error messages, and configure their behavior.

The following example demonstrates how to use the Switch within a FormField with hint and error messages.

Example
View Source
Loading ...

Mapping Boolean Values to Custom Form Values

The Switch uses boolean values in Angular forms. If your application stores a different value type, bind the Switch to a boolean FormControl and map the values when you load and save the form.

When you load the form, set the control to true if the stored value matches the value you use for the on state. Set it to false otherwise. When you save the form, map the control's boolean value to the corresponding stored value for the on or off state.

The following example starts with Y as the stored value. Toggle the Switch to see the boolean form control value and the corresponding Y or N value to store. Feel free to adapt the mapping logic to match the values used by your application.

Example
View Source
Loading ...