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

SwitchComponent

Represents the Kendo UI Switch component for Angular.

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

Selector

kendo-switch

Export Name

Accessible in templates as #kendoSwitchInstance="kendoSwitch"

Inputs

NameTypeDefaultDescription

checked

boolean

Sets the value of the Switch when it first appears.

disabled

boolean

false

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

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

false

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

size

InputSize

"medium"

Sets the size of the Switch.

tabindex

number

0

Set the tabindex of the Switch.

thumbRounded

InputRounded

"full"

Sets the border radius of the Switch.

trackRounded

InputRounded

"full"

Sets the border radius of the Switch track.

Events

NameTypeDescription

blur

EventEmitter<SwitchBlurEvent>

Fires when the user blurs the Switch.

focus

EventEmitter<SwitchFocusEvent>

Fires when the user focuses the Switch.

valueChange

EventEmitter<any>

Fires when the value of the Switch changes.

Methods

blur

Blurs the Switch.

focus

Focuses the Switch.

In this article
SelectorExport NameInputsEventsMethods
Not finding the help you need?
Contact Support