Switch

Switches display a couple of exclusive choices so that users can toggle the state of an item on and off.

Sass Variables

The Telerik and Kendo UI Switch enables you to configure and customize its appearance through the available Sass variables.

VariableDefault ValueComputed ValueValue
kendo-switch-default-size"md""md"Default: "md"Computed: "md"
Description: The default size of the Switch.
kendo-switch-default-track-roundness"full""full"Default: "full"Computed: "full"
Description: The default border radius of the Switch track.
kendo-switch-default-thumb-roundness"full""full"Default: "full"Computed: "full"
Description: The default border radius of the Switch thumb.
kendo-switch-font-familynullnullDefault: nullComputed: null
Description: The font family of the Switch.
kendo-switch-track-border-width1px1pxDefault: 1pxComputed: 1px
Description: The border width of the Switch track.
kendo-switch-thumb-border-width1px1pxDefault: 1pxComputed: 1px
Description: The border width of the Switch thumb.
kendo-switch-label-text-transformuppercaseuppercaseDefault: uppercaseComputed: uppercase
Description: The text transform of the Switch label.
kendo-switch-label-displayinlineinlineDefault: inlineComputed: inline
Description: The display of the Switch label.
kendo-switch-sm-font-size10px10pxDefault: 10pxComputed: 10px
Description: The font size of the small Switch.
kendo-switch-sm-track-width52px52pxDefault: 52pxComputed: 52px
Description: The track width of the small Switch.
kendo-switch-sm-track-height26px26pxDefault: 26pxComputed: 26px
Description: The track height of the small Switch.
kendo-switch-sm-thumb-width26px26pxDefault: 26pxComputed: 26px
Description: The thumb width of the small Switch.
kendo-switch-sm-thumb-height26px26pxDefault: 26pxComputed: 26px
Description: The thumb height of the small Switch.
kendo-switch-sm-thumb-offset0px0pxDefault: 0pxComputed: 0px
Description: The thumb offset of the small Switch.
kendo-switch-sm-label-offset4px4pxDefault: 4pxComputed: 4px
Description: The label offset of the small Switch.
kendo-switch-md-font-size10px10pxDefault: 10pxComputed: 10px
Description: The font size of the medium Switch.
kendo-switch-md-track-width60px60pxDefault: 60pxComputed: 60px
Description: The track width of the medium Switch.
kendo-switch-md-track-height30px30pxDefault: 30pxComputed: 30px
Description: The track height of the medium Switch.
kendo-switch-md-thumb-width30px30pxDefault: 30pxComputed: 30px
Description: The thumb width of the medium Switch.
kendo-switch-md-thumb-height30px30pxDefault: 30pxComputed: 30px
Description: The thumb height of the medium Switch.
kendo-switch-md-thumb-offset0px0pxDefault: 0pxComputed: 0px
Description: The thumb offset of the medium Switch.
kendo-switch-md-label-offset6px6pxDefault: 6pxComputed: 6px
Description: The label offset of the medium Switch.
kendo-switch-lg-font-size10px10pxDefault: 10pxComputed: 10px
Description: The font size of the large Switch.
kendo-switch-lg-track-width68px68pxDefault: 68pxComputed: 68px
Description: The track width of the large Switch.
kendo-switch-lg-track-height34px34pxDefault: 34pxComputed: 34px
Description: The track height of the large Switch.
kendo-switch-lg-thumb-width34px34pxDefault: 34pxComputed: 34px
Description: The thumb width of the large Switch.
kendo-switch-lg-thumb-height34px34pxDefault: 34pxComputed: 34px
Description: The thumb height of the large Switch.
kendo-switch-lg-thumb-offset0px0pxDefault: 0pxComputed: 0px
Description: The thumb offset of the large Switch.
kendo-switch-lg-label-offset8px8pxDefault: 8pxComputed: 8px
Description: The label offset of the large Switch.
kendo-switch-off-track-bgk-color(surface-alt)var(--kendo-color-surface-alt, #ffffff)Default: k-color(surface-alt)Computed: var(--kendo-color-surface-alt, #ffffff)
Description: The background of the track when the Switch is not checked.
kendo-switch-off-track-textk-color(on-app-surface)var(--kendo-color-on-app-surface, #3d3d3d)Default: k-color(on-app-surface)Computed: var(--kendo-color-on-app-surface, #3d3d3d)
Description: The text color of the track when the Switch is not checked.
kendo-switch-off-track-borderk-color(border)var(--kendo-color-border, rgba(0, 0, 0, 0.08))Default: k-color(border)Computed: var(--kendo-color-border, rgba(0, 0, 0, 0.08))
Description: The border color of the track when the Switch is not checked.
kendo-switch-off-track-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the Switch is not checked.
kendo-switch-off-track-hover-bgnullnullDefault: nullComputed: null
Description: The background of the track when the hovered Switch is not checked.
kendo-switch-off-track-hover-textnullnullDefault: nullComputed: null
Description: The text color of the track when the hovered Switch is not checked.
kendo-switch-off-track-hover-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the hovered Switch is not checked.
kendo-switch-off-track-hover-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the hovered Switch is not checked.
kendo-switch-off-track-focus-bgnullnullDefault: nullComputed: null
Description: The background of the track when the focused Switch is not checked.
kendo-switch-off-track-focus-textnullnullDefault: nullComputed: null
Description: The text color of the track when the focused Switch is not checked.
kendo-switch-off-track-focus-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the focused Switch is not checked.
kendo-switch-off-track-focus-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the focused Switch is not checked.
kendo-switch-off-track-focus-ring2px solid color-mix(in srgb, k-color(on-app-surface) 8%, transparent)(2px solid color-mix(in srgb, var(--kendo-color-on-app-surface, #3d3d3d) 8%, transparent))Default: 2px solid color-mix(in srgb, k-color(on-app-surface) 8%, transparent)Computed: (2px solid color-mix(in srgb, var(--kendo-color-on-app-surface, #3d3d3d) 8%, transparent))
Description: The ring around the track when the focused Switch is not checked.
kendo-switch-off-track-disabled-bgnullnullDefault: nullComputed: null
Description: The background of the track when the disabled Switch is not checked.
kendo-switch-off-track-disabled-textnullnullDefault: nullComputed: null
Description: The text color of the track when the disabled Switch is not checked.
kendo-switch-off-track-disabled-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the disabled Switch is not checked.
kendo-switch-off-track-disabled-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the disabled Switch is not checked.
kendo-switch-off-thumb-bgk-color(surface)var(--kendo-color-surface, #fafafa)Default: k-color(surface)Computed: var(--kendo-color-surface, #fafafa)
Description: The background of the thumb when the Switch is not checked.
kendo-switch-off-thumb-textk-color(on-app-surface)var(--kendo-color-on-app-surface, #3d3d3d)Default: k-color(on-app-surface)Computed: var(--kendo-color-on-app-surface, #3d3d3d)
Description: The text color of the thumb when the Switch is not checked.
kendo-switch-off-thumb-borderk-color(border)var(--kendo-color-border, rgba(0, 0, 0, 0.08))Default: k-color(border)Computed: var(--kendo-color-border, rgba(0, 0, 0, 0.08))
Description: The border color of the thumb when the Switch is not checked.
kendo-switch-off-thumb-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the Switch is not checked.
kendo-switch-off-thumb-hover-bgnullnullDefault: nullComputed: null
Description: The background of the thumb when the hovered Switch is not checked.
kendo-switch-off-thumb-hover-textnullnullDefault: nullComputed: null
Description: The text color of the thumb when the hovered Switch is not checked.
kendo-switch-off-thumb-hover-bordernullnullDefault: nullComputed: null
Description: The border color of the thumb when the hovered Switch is not checked.
kendo-switch-off-thumb-hover-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the hovered Switch is not checked.
kendo-switch-off-thumb-disabled-bgnullnullDefault: nullComputed: null
Description: The background of the thumb when the disabled Switch is not checked.
kendo-switch-off-thumb-disabled-textnullnullDefault: nullComputed: null
Description: The text color of the thumb when the disabled Switch is not checked.
kendo-switch-off-thumb-disabled-bordernullnullDefault: nullComputed: null
Description: The border color of the thumb when the disabled Switch is not checked.
kendo-switch-off-thumb-disabled-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the disabled Switch is not checked.
kendo-switch-on-track-bgk-color(primary)var(--kendo-color-primary, #ff6358)Default: k-color(primary)Computed: var(--kendo-color-primary, #ff6358)
Description: The background of the track when the Switch is checked.
kendo-switch-on-track-textk-color(on-primary)var(--kendo-color-on-primary, #ffffff)Default: k-color(on-primary)Computed: var(--kendo-color-on-primary, #ffffff)
Description: The text color of the track when the Switch is checked.
kendo-switch-on-track-border$kendo-switch-on-track-bgvar(--kendo-color-primary, #ff6358)Default: $kendo-switch-on-track-bgComputed: var(--kendo-color-primary, #ff6358)
Description: The border color of the track when the Switch is checked.
kendo-switch-on-track-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the Switch is checked.
kendo-switch-on-track-hover-bgnullnullDefault: nullComputed: null
Description: The background of the track when the hovered Switch is checked.
kendo-switch-on-track-hover-textnullnullDefault: nullComputed: null
Description: The text color of the track when the hovered Switch is checked.
kendo-switch-on-track-hover-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the hovered Switch is checked.
kendo-switch-on-track-hover-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the hovered Switch is checked.
kendo-switch-on-track-focus-bgnullnullDefault: nullComputed: null
Description: The background of the track when the focused Switch is checked.
kendo-switch-on-track-focus-textnullnullDefault: nullComputed: null
Description: The text color of the track when the focused Switch is checked.
kendo-switch-on-track-focus-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the focused Switch is checked.
kendo-switch-on-track-focus-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the focused Switch is checked.
kendo-switch-on-track-focus-ring2px solid color-mix(in srgb, k-color(primary) 25%, transparent)(2px solid color-mix(in srgb, var(--kendo-color-primary, #ff6358) 25%, transparent))Default: 2px solid color-mix(in srgb, k-color(primary) 25%, transparent)Computed: (2px solid color-mix(in srgb, var(--kendo-color-primary, #ff6358) 25%, transparent))
Description: The ring around the track when the focused Switch is checked.
kendo-switch-on-track-disabled-bgnullnullDefault: nullComputed: null
Description: The background of the track when the disabled Switch is checked.
kendo-switch-on-track-disabled-textnullnullDefault: nullComputed: null
Description: The text color of the track when the disabled Switch is checked.
kendo-switch-on-track-disabled-bordernullnullDefault: nullComputed: null
Description: The border color of the track when the disabled Switch is checked.
kendo-switch-on-track-disabled-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the track when the disabled Switch is checked.
kendo-switch-on-thumb-bgk-color(surface)var(--kendo-color-surface, #fafafa)Default: k-color(surface)Computed: var(--kendo-color-surface, #fafafa)
Description: The background of the thumb when the Switch is checked.
kendo-switch-on-thumb-textk-color(on-app-surface)var(--kendo-color-on-app-surface, #3d3d3d)Default: k-color(on-app-surface)Computed: var(--kendo-color-on-app-surface, #3d3d3d)
Description: The text color of the thumb when the Switch is checked.
kendo-switch-on-thumb-borderk-color(border)var(--kendo-color-border, rgba(0, 0, 0, 0.08))Default: k-color(border)Computed: var(--kendo-color-border, rgba(0, 0, 0, 0.08))
Description: The border color of the thumb when the Switch is checked.
kendo-switch-on-thumb-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the Switch is checked.
kendo-switch-on-thumb-hover-bgnullnullDefault: nullComputed: null
Description: The background of the thumb when the hovered Switch is checked.
kendo-switch-on-thumb-hover-textnullnullDefault: nullComputed: null
Description: The text color of the thumb when the hovered Switch is checked.
kendo-switch-on-thumb-hover-bordernullnullDefault: nullComputed: null
Description: The border color of the thumb when the hovered Switch is checked.
kendo-switch-on-thumb-hover-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the hovered Switch is checked.
kendo-switch-on-thumb-disabled-bgnullnullDefault: nullComputed: null
Description: The background of the thumb when the disabled Switch is checked.
kendo-switch-on-thumb-disabled-textnullnullDefault: nullComputed: null
Description: The text color of the thumb when the disabled Switch is checked.
kendo-switch-on-thumb-disabled-bordernullnullDefault: nullComputed: null
Description: The border color of the thumb when the disabled Switch is checked.
kendo-switch-on-thumb-disabled-gradientnullnullDefault: nullComputed: null
Description: The background gradient of the thumb when the disabled Switch is checked.
kendo-switch-sizes
sm: "font-size":"10px","track-width":"52px","track-height":"26px","thumb-width":"26px","thumb-height":"26px","thumb-offset":"0px","label-offset":"4px"
md: "font-size":"10px","track-width":"60px","track-height":"30px","thumb-width":"30px","thumb-height":"30px","thumb-offset":"0px","label-offset":"6px"
lg: "font-size":"10px","track-width":"68px","track-height":"34px","thumb-width":"34px","thumb-height":"34px","thumb-offset":"0px","label-offset":"8px"
Computed: (sm: (font-size: 10px, track-width: 52px, track-height: 26px, thumb-width: 26px, thumb-height: 26px, thumb-offset: 0px, label-offset: 4px), md: (font-size: 10px, track-width: 60px, track-height: 30px, thumb-width: 30px, thumb-height: 30px, thumb-offset: 0px, label-offset: 6px), lg: (font-size: 10px, track-width: 68px, track-height: 34px, thumb-width: 34px, thumb-height: 34px, thumb-offset: 0px, label-offset: 8px))
Description: The map with the different Switch sizes.
Feedback