New to Kendo UI for AngularStart a free 30-day trial

Definition

Package:@progress/kendo-angular-inputs

Selector:kendo-switch

Export Name:Accessible in templates as #kendoSwitchInstance="kendoSwitch"

Syntax:

html
<kendo-switch [(ngModel)]="checked"></kendo-switch>`

Inputs

checked

boolean

Sets the value of the Switch when it first appears.

disabled

boolean

When true, disables the Switch. See example. To disable the component in reactive forms, see Forms Support.

Default:

false

offLabel

string

Set the Off label. This label takes precedence over the custom messages component. See example.

onLabel

string

Set the On label. This label takes precedence over the custom messages component. See example.

readonly

boolean

When true, sets the Switch to read-only. See example.

Default:

false

Sets the size of the Switch. The default value is set by the Kendo theme.

tabindex

number

Set the tabindex of the Switch.

Default:

0

Sets the border radius of the Switch. The default value is set by the Kendo theme.

Sets the border radius of the Switch track. The default value is set by the Kendo theme.

Events

Fires when the user blurs the Switch.

Fires when the user focuses the Switch.

Fires when the value of the Switch changes.

Methods

Blurs the Switch.

Focuses the Switch.