• Components
    • Barcodes
    • Buttons
    • Charts
    • Conversational UI
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogsupdated
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filterupdated
    • Ganttupdated
    • Gauges
    • Gridupdated
    • Icons
    • Indicatorsupdated
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Mapbeta
    • Menus
    • Navigationupdated
    • Notification
    • Pager
    • PDF Export
    • PivotGridupdated
    • Popup
    • ProgressBarsupdated
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • ToolBar
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Typography
    • Uploads
    • Utilitiesnew
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
New to Kendo UI for Angular? Start a free 30-day trial

SwitchComponent

Represents the Kendo UI Switch component for Angular.

Selector

kendo-switch

Export Name

Accessible in templates as #kendoSwitchInstance="kendoSwitch"

Inputs

NameTypeDefaultDescription

checked

boolean

Sets the value of the Switch when it is initially displayed.

disabled

boolean

Determines whether the Switch is disabled (see example).

offLabel

string

Changes the Off label so that it can be localized (see example).

onLabel

string

Changes the On label so that it can be localized (see example).

readonly

boolean

Determines whether the Switch is in its read-only state (see example).

size

InputSize

Specifies the width and height of the Switch.

The possible values are:

  • small
  • medium (default)
  • large
  • none

tabindex

number

Specifies the tabindex of the Switch.

thumbRounded

InputRounded

Specifies the border radius of the Switch thumb.

The possible values are:

  • full (default)
  • small
  • medium
  • large
  • none

trackRounded

InputRounded

Specifies the border radius of the Switch track.

The possible values are:

  • full (default)
  • small
  • medium
  • large
  • none

Events

NameTypeDescription

blur

EventEmitter<any>

Fires each time the input element gets blurred.

focus

EventEmitter<any>

Fires each time the user focuses the input element.

valueChange

EventEmitter<any>

Fires each time the user selects a new value.

Methods

blur

Blurs the Switch.

focus

Focuses the Switch.

@Component({
selector: 'my-app',
template: `
 <button (click)="switch.focus()">Focus</button>
 <kendo-switch #switch></kendo-switch>
`
})
class AppComponent { }

In this article

Not finding the help you need?