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-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-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 ) )(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))Default: ( 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.
kendo-switch-off-track-bg$kendo-component-bg #ffffffDefault: $kendo-component-bgComputed: #ffffff
Description: The background of the track when the Switch is not checked.
kendo-switch-off-track-text$kendo-component-text #424242Default: $kendo-component-textComputed: #424242
Description: The text color of the track when the Switch is not checked.
kendo-switch-off-track-borderif($kendo-enable-color-system, k-color( border ), k-try-shade( $kendo-switch-off-track-bg, 8% )) #ebebebDefault: if($kendo-enable-color-system, k-color( border ), k-try-shade( $kendo-switch-off-track-bg, 8% ))Computed: #ebebeb
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 if($kendo-enable-color-system, rgba( k-color( on-app-surface, true ), .08 ), rgba( if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black ) , .08 ))2px solid rgba(0, 0, 0, 0.08)Default: 2px solid if($kendo-enable-color-system, rgba( k-color( on-app-surface, true ), .08 ), rgba( if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black ) , .08 ))Computed: 2px solid rgba(0, 0, 0, 0.08)
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-bg$kendo-base-bg #fafafaDefault: $kendo-base-bgComputed: #fafafa
Description: The background of the thumb when the Switch is not checked.
kendo-switch-off-thumb-text$kendo-base-text #424242Default: $kendo-base-textComputed: #424242
Description: The text color of the thumb when the Switch is not checked.
kendo-switch-off-thumb-border$kendo-base-border rgba(0, 0, 0, 0.08)Default: $kendo-base-borderComputed: 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-on-track-bg$kendo-color-primary #ff6358Default: $kendo-color-primaryComputed: #ff6358
Description: The background of the track when the Switch is checked.
kendo-switch-on-track-textif($kendo-enable-color-system, k-color( on-primary ), k-contrast-legacy( $kendo-switch-on-track-bg )) whiteDefault: if($kendo-enable-color-system, k-color( on-primary ), k-contrast-legacy( $kendo-switch-on-track-bg ))Computed: white
Description: The text color of the track when the Switch is checked.
kendo-switch-on-track-border$kendo-switch-on-track-bg #ff6358Default: $kendo-switch-on-track-bgComputed: #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 if($kendo-enable-color-system, rgba( k-color( primary, true ), .25 ), rgba( $kendo-switch-on-track-border, .25 ))2px solid rgba(255, 99, 88, 0.25)Default: 2px solid if($kendo-enable-color-system, rgba( k-color( primary, true ), .25 ), rgba( $kendo-switch-on-track-border, .25 ))Computed: 2px solid rgba(255, 99, 88, 0.25)
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-bg$kendo-base-bg #fafafaDefault: $kendo-base-bgComputed: #fafafa
Description: The background of the thumb when the Switch is checked.
kendo-switch-on-thumb-text$kendo-base-text #424242Default: $kendo-base-textComputed: #424242
Description: The text color of the thumb when the Switch is checked.
kendo-switch-on-thumb-border$kendo-base-border rgba(0, 0, 0, 0.08)Default: $kendo-base-borderComputed: 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.