Customizing Switch
Variables
The following table lists the available variables for customization.
Name | Type | Default value | Computed value |
---|---|---|---|
$kendo-switch-font-family | String | var( --kendo-font-family, normal ) | var(--kendo-font-family, normal) |
Description
The font family of the Switch. | |||
$kendo-switch-track-border-width | Number | 1px | 1px |
Description
The border width of the Switch track. | |||
$kendo-switch-thumb-border-width | Number | 0 | 0 |
Description
The border width of the Switch thumb. | |||
$kendo-switch-label-text-transform | String | uppercase | uppercase |
Description
The text transform of the Switch label. | |||
$kendo-switch-label-display | String | none | none |
Description
The display of the Switch label. | |||
$kendo-switch-sizes | Map | (
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 )
) | (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-ring | List | 1px solid if($kendo-enable-color-system, k-color( base-emphasis ), k-get-theme-color-var( neutral-130 )) | 1px solid var(--kendo-color-base-emphasis, #605e5c) |
Description
The ring around the focused Switch. | |||
$kendo-switch-off-track-bg | String | var( --kendo-component-bg, transparent ) | var(--kendo-component-bg, transparent) |
Description
The background of the track when the Switch is not checked. | |||
$kendo-switch-off-track-text | String | var( --kendo-component-text, inherit ) | var(--kendo-component-text, inherit) |
Description
The text color of the track when the Switch is not checked. | |||
$kendo-switch-off-track-border | String | if($kendo-enable-color-system, k-color( border ), k-get-theme-color-var( neutral-110 )) | var(--kendo-color-border, #8a8886) |
Description
The border color of the track when the Switch is not checked. | |||
$kendo-switch-off-track-hover-bg | String | var( --kendo-component-bg, transparent ) | var(--kendo-component-bg, transparent) |
Description
The background of the track when the hovered Switch is not checked. | |||
$kendo-switch-off-track-hover-text | String | var( --kendo-component-text, inherit ) | var(--kendo-component-text, inherit) |
Description
The text color of the track when the hovered Switch is not checked. | |||
$kendo-switch-off-track-hover-border | String | if($kendo-enable-color-system, k-color( border-alt ), k-get-theme-color-var( neutral-160 )) | var(--kendo-color-border-alt, #323130) |
Description
The border color of the track when the hovered Switch is not checked. | |||
$kendo-switch-off-track-focus-bg | String | var( --kendo-component-bg, transparent ) | var(--kendo-component-bg, transparent) |
Description
The background of the track when the focused Switch is not checked. | |||
$kendo-switch-off-track-focus-text | String | var( --kendo-component-text, inherit ) | var(--kendo-component-text, inherit) |
Description
The text color of the track when the focused Switch is not checked. | |||
$kendo-switch-off-track-focus-border | String | if($kendo-enable-color-system, k-color( border ), k-get-theme-color-var( neutral-110 )) | var(--kendo-color-border, #8a8886) |
Description
The border color of the track when the focused Switch is not checked. | |||
$kendo-switch-off-track-disabled-bg | String | var( --kendo-component-bg, transparent ) | var(--kendo-component-bg, transparent) |
Description
The background of the track when the disabled Switch is not checked. | |||
$kendo-switch-off-track-disabled-text | String | var( --kendo-component-text, inherit ) | var(--kendo-component-text, inherit) |
Description
The text color of the track when the disabled Switch is not checked. | |||
$kendo-switch-off-track-disabled-border | String | if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 )) | color-mix(in srgb, var(--kendo-color-on-app-surface, #323130) 28%, transparent) |
Description
The border color of the track when the disabled Switch is not checked. | |||
$kendo-switch-off-thumb-bg | String | if($kendo-enable-color-system, k-color( subtle ), k-get-theme-color-var( neutral-130 )) | var(--kendo-color-subtle, #605e5c) |
Description
The background of the thumb when the Switch is not checked. | |||
$kendo-switch-off-thumb-text | String | inherit | inherit |
Description
The text color of the thumb when the Switch is not checked. | |||
$kendo-switch-off-thumb-border | String | if($kendo-enable-color-system, k-color( border ), k-get-theme-color-var( neutral-130 )) | var(--kendo-color-border, #8a8886) |
Description
The border color of the thumb when the Switch is not checked. | |||
$kendo-switch-off-thumb-hover-bg | String | if($kendo-enable-color-system, k-color( on-app-surface ), k-get-theme-color-var( neutral-160 )) | var(--kendo-color-on-app-surface, #323130) |
Description
The background of the thumb when the hovered Switch is not checked. | |||
$kendo-switch-off-thumb-hover-text | String | inherit | inherit |
Description
The text color of the thumb when the hovered Switch is not checked. | |||
$kendo-switch-off-thumb-hover-border | String | if($kendo-enable-color-system, k-color( border-alt ), k-get-theme-color-var( neutral-160 )) | var(--kendo-color-border-alt, #323130) |
Description
The border color of the thumb when the hovered Switch is not checked. | |||
$kendo-switch-off-thumb-disabled-bg | String | if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 )) | color-mix(in srgb, var(--kendo-color-on-app-surface, #323130) 28%, transparent) |
Description
The background of the thumb when the disabled Switch is not checked. | |||
$kendo-switch-off-thumb-disabled-text | String | inherit | inherit |
Description
The text color of the thumb when the disabled Switch is not checked. | |||
$kendo-switch-off-thumb-disabled-border | String | if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 )) | color-mix(in srgb, var(--kendo-color-on-app-surface, #323130) 28%, transparent) |
Description
The border color of the thumb when the disabled Switch is not checked. | |||
$kendo-switch-on-track-bg | String | if($kendo-enable-color-system, k-color( primary ), k-get-theme-color-var( primary-100 )) | var(--kendo-color-primary, #0078d4) |
Description
The background of the track when the Switch is checked. | |||
$kendo-switch-on-track-text | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The text color of the track when the Switch is checked. | |||
$kendo-switch-on-track-border | String | $kendo-switch-on-track-bg | var(--kendo-color-primary, #0078d4) |
Description
The border color of the track when the Switch is checked. | |||
$kendo-switch-on-track-hover-bg | String | if($kendo-enable-color-system, k-color( primary-hover ), k-get-theme-color-var( primary-110 )) | var(--kendo-color-primary-hover, #106ebe) |
Description
The background of the track when the hovered Switch is checked. | |||
$kendo-switch-on-track-hover-text | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The text color of the track when the hovered Switch is checked. | |||
$kendo-switch-on-track-hover-border | String | $kendo-switch-on-track-hover-bg | var(--kendo-color-primary-hover, #106ebe) |
Description
The border color of the track when the hovered Switch is checked. | |||
$kendo-switch-on-track-focus-bg | String | if($kendo-enable-color-system, k-color( primary ), k-get-theme-color-var( primary-100 )) | var(--kendo-color-primary, #0078d4) |
Description
The background of the track when the focused Switch is checked. | |||
$kendo-switch-on-track-focus-text | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The text color of the track when the focused Switch is checked. | |||
$kendo-switch-on-track-focus-border | String | $kendo-switch-on-track-focus-bg | var(--kendo-color-primary, #0078d4) |
Description
The border color of the track when the focused Switch is checked. | |||
$kendo-switch-on-track-disabled-bg | String | if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 28%, transparent), k-get-theme-color-var( neutral-60 )) | color-mix(in srgb, var(--kendo-color-on-app-surface, #323130) 28%, transparent) |
Description
The background of the track when the disabled Switch is checked. | |||
$kendo-switch-on-track-disabled-text | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The text color of the track when the disabled Switch is checked. | |||
$kendo-switch-on-track-disabled-border | Color | if($kendo-enable-color-system, transparent, $kendo-switch-on-track-disabled-bg) | transparent |
Description
The border color of the track when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-bg | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The background of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-text | String | inherit | inherit |
Description
The text color of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-border | String | inherit | inherit |
Description
The border color of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-hover-bg | String | if($kendo-enable-color-system, k-color( app-surface ), $kendo-color-white) | var(--kendo-color-app-surface, #ffffff) |
Description
The background of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-hover-text | String | inherit | inherit |
Description
The text color of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-hover-border | String | inherit | inherit |
Description
The border color of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-disabled-bg | String | if($kendo-enable-color-system, k-color( surface ), k-get-theme-color-var( neutral-20 )) | var(--kendo-color-surface, #faf9f8) |
Description
The background of the thumb when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-disabled-text | String | inherit | inherit |
Description
The text color of the thumb when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-disabled-border | String | if($kendo-enable-color-system, color-mix(in srgb, k-color( on-app-surface ) 6%, transparent), k-get-theme-color-var( neutral-20 )) | color-mix(in srgb, var(--kendo-color-on-app-surface, #323130) 6%, transparent) |
Description
The border color of the thumb when the disabled Switch is checked. |