Customizing Switch

Variables

The following table lists the available variables for customization.

NameTypeDefault valueComputed value
$kendo-switch-font-familyvar( --kendo-font-family, normal )
Description
The font family of the Switch.
$kendo-switch-track-border-width1px
Description
The border width of the Switch track.
$kendo-switch-thumb-border-width0
Description
The border width of the Switch thumb.
$kendo-switch-label-text-transformuppercase
Description
The text transform of the Switch label.
$kendo-switch-label-displaynone
Description
The display of the Switch label.
$kendo-switch-sizes( sm: ( font-size: 10px, track-width: 36px, track-height: 16px, thumb-width: 10px, thumb-height: 10px, thumb-offset: 3px, label-offset: 4px ), md: ( font-size: 10px, track-width: 40px, track-height: 20px, thumb-width: 12px, thumb-height: 12px, thumb-offset: 4px, label-offset: 5px ), lg: ( font-size: 10px, track-width: 44px, track-height: 24px, thumb-width: 14px, thumb-height: 14px, thumb-offset: 5px, label-offset: 6px ) )
Description
The map with the different Switch sizes.
$kendo-switch-focus-ring1px solid if($kendo-enable-color-system, k-color( base-emphasis ), k-get-theme-color-var( neutral-130 ))
Description
The ring around the focused Switch.
$kendo-switch-off-track-bgvar( --kendo-component-bg, transparent )
Description
The background of the track when the Switch is not checked.
$kendo-switch-off-track-textvar( --kendo-component-text, inherit )
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-get-theme-color-var( neutral-110 ))
Description
The border color of the track when the Switch is not checked.
$kendo-switch-off-track-hover-bgvar( --kendo-component-bg, transparent )
Description
The background of the track when the hovered Switch is not checked.
$kendo-switch-off-track-hover-textvar( --kendo-component-text, inherit )
Description
The text color of the track when the hovered Switch is not checked.
$kendo-switch-off-track-hover-borderif($kendo-enable-color-system, k-color( border-alt ), k-get-theme-color-var( neutral-160 ))
Description
The border color of the track when the hovered Switch is not checked.
$kendo-switch-off-track-focus-bgvar( --kendo-component-bg, transparent )
Description
The background of the track when the focused Switch is not checked.
$kendo-switch-off-track-focus-textvar( --kendo-component-text, inherit )
Description
The text color of the track when the focused Switch is not checked.
$kendo-switch-off-track-focus-borderif($kendo-enable-color-system, k-color( border ), k-get-theme-color-var( neutral-110 ))
Description
The border color of the track when the focused Switch is not checked.
$kendo-switch-off-track-disabled-bgvar( --kendo-component-bg, transparent )
Description
The background of the track when the disabled Switch is not checked.
$kendo-switch-off-track-disabled-textvar( --kendo-component-text, inherit )
Description
The text color of the track when the disabled Switch is not checked.
$kendo-switch-off-track-disabled-borderif($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 ))
Description
The border color of the track when the disabled Switch is not checked.
$kendo-switch-off-thumb-bgif($kendo-enable-color-system, k-color( subtle ), k-get-theme-color-var( neutral-130 ))
Description
The background of the thumb when the Switch is not checked.
$kendo-switch-off-thumb-textinherit
Description
The text color of the thumb when the Switch is not checked.
$kendo-switch-off-thumb-borderif($kendo-enable-color-system, k-color( border ), k-get-theme-color-var( neutral-130 ))
Description
The border color of the thumb when the Switch is not checked.
$kendo-switch-off-thumb-hover-bgif($kendo-enable-color-system, k-color( on-app-surface ), k-get-theme-color-var( neutral-160 ))
Description
The background of the thumb when the hovered Switch is not checked.
$kendo-switch-off-thumb-hover-textinherit
Description
The text color of the thumb when the hovered Switch is not checked.
$kendo-switch-off-thumb-hover-borderif($kendo-enable-color-system, k-color( border-alt ), k-get-theme-color-var( neutral-160 ))
Description
The border color of the thumb when the hovered Switch is not checked.
$kendo-switch-off-thumb-disabled-bgif($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 ))
Description
The background of the thumb when the disabled Switch is not checked.
$kendo-switch-off-thumb-disabled-textinherit
Description
The text color of the thumb when the disabled Switch is not checked.
$kendo-switch-off-thumb-disabled-borderif($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 ))
Description
The border color of the thumb when the disabled Switch is not checked.
$kendo-switch-on-track-bgif($kendo-enable-color-system, k-color( primary ), k-get-theme-color-var( primary-100 ))
Description
The background of the track when the Switch is checked.
$kendo-switch-on-track-textif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The text color of the track when the Switch is checked.
$kendo-switch-on-track-border$kendo-switch-on-track-bg
Description
The border color of the track when the Switch is checked.
$kendo-switch-on-track-hover-bgif($kendo-enable-color-system, k-color( primary-hover ), k-get-theme-color-var( primary-110 ))
Description
The background of the track when the hovered Switch is checked.
$kendo-switch-on-track-hover-textif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The text color of the track when the hovered Switch is checked.
$kendo-switch-on-track-hover-border$kendo-switch-on-track-hover-bg
Description
The border color of the track when the hovered Switch is checked.
$kendo-switch-on-track-focus-bgif($kendo-enable-color-system, k-color( primary ), k-get-theme-color-var( primary-100 ))
Description
The background of the track when the focused Switch is checked.
$kendo-switch-on-track-focus-textif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The text color of the track when the focused Switch is checked.
$kendo-switch-on-track-focus-border$kendo-switch-on-track-focus-bg
Description
The border color of the track when the focused Switch is checked.
$kendo-switch-on-track-disabled-bgif($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 ))
Description
The background of the track when the disabled Switch is checked.
$kendo-switch-on-track-disabled-textif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The text color of the track when the disabled Switch is checked.
$kendo-switch-on-track-disabled-borderif($kendo-enable-color-system, transparent, $kendo-switch-on-track-disabled-bg)
Description
The border color of the track when the disabled Switch is checked.
$kendo-switch-on-thumb-bgif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The background of the thumb when the Switch is checked.
$kendo-switch-on-thumb-textinherit
Description
The text color of the thumb when the Switch is checked.
$kendo-switch-on-thumb-borderinherit
Description
The border color of the thumb when the Switch is checked.
$kendo-switch-on-thumb-hover-bgif($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white)
Description
The background of the thumb when the hovered Switch is checked.
$kendo-switch-on-thumb-hover-textinherit
Description
The text color of the thumb when the hovered Switch is checked.
$kendo-switch-on-thumb-hover-borderinherit
Description
The border color of the thumb when the hovered Switch is checked.
$kendo-switch-on-thumb-disabled-bgif($kendo-enable-color-system, k-color( surface ), k-get-theme-color-var( neutral-20 ))
Description
The background of the thumb when the disabled Switch is checked.
$kendo-switch-on-thumb-disabled-textinherit
Description
The text color of the thumb when the disabled Switch is checked.
$kendo-switch-on-thumb-disabled-borderif($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 6%, transparent), k-get-theme-color-var( neutral-20 ))
Description
The border color of the thumb when the disabled Switch is checked.

In this article

Not finding the help you need?