New to Kendo UI for Angular? Start a free 30-day trial
Customizing Switch
Variables
The following table lists the available variables for customization.
Name | Type | Default value | Computed value |
---|---|---|---|
$kendo-switch-font-family | var( --kendo-font-family, normal ) | ||
Description
The font family of the Switch. | |||
$kendo-switch-track-border-width | 1px | ||
Description
The border width of the Switch track. | |||
$kendo-switch-thumb-border-width | 0 | ||
Description
The border width of the Switch thumb. | |||
$kendo-switch-label-text-transform | uppercase | ||
Description
The text transform of the Switch label. | |||
$kendo-switch-label-display | none | ||
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-ring | 1px solid k-get-theme-color-var( neutral-130 ) | ||
Description
The ring around the focused Switch. | |||
$kendo-switch-off-track-bg | var( --kendo-component-bg, transparent ) | ||
Description
The background of the track when the Switch is not checked. | |||
$kendo-switch-off-track-text | var( --kendo-component-text, inherit ) | ||
Description
The text color of the track when the Switch is not checked. | |||
$kendo-switch-off-track-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-bg | var( --kendo-component-bg, transparent ) | ||
Description
The background of the track when the hovered Switch is not checked. | |||
$kendo-switch-off-track-hover-text | 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 | 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-bg | var( --kendo-component-bg, transparent ) | ||
Description
The background of the track when the focused Switch is not checked. | |||
$kendo-switch-off-track-focus-text | 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 | 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-bg | var( --kendo-component-bg, transparent ) | ||
Description
The background of the track when the disabled Switch is not checked. | |||
$kendo-switch-off-track-disabled-text | 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 | 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-bg | k-get-theme-color-var( neutral-130 ) | ||
Description
The background of the thumb when the Switch is not checked. | |||
$kendo-switch-off-thumb-text | inherit | ||
Description
The text color of the thumb when the Switch is not checked. | |||
$kendo-switch-off-thumb-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-bg | 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-text | inherit | ||
Description
The text color of the thumb when the hovered Switch is not checked. | |||
$kendo-switch-off-thumb-hover-border | 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-bg | 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-text | inherit | ||
Description
The text color of the thumb when the disabled Switch is not checked. | |||
$kendo-switch-off-thumb-disabled-border | 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-bg | k-get-theme-color-var( primary-100 ) | ||
Description
The background of the track when the Switch is checked. | |||
$kendo-switch-on-track-text | $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-bg | k-get-theme-color-var( primary-110 ) | ||
Description
The background of the track when the hovered Switch is checked. | |||
$kendo-switch-on-track-hover-text | $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-bg | k-get-theme-color-var( primary-100 ) | ||
Description
The background of the track when the focused Switch is checked. | |||
$kendo-switch-on-track-focus-text | $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-bg | k-get-theme-color-var( neutral-60 ) | ||
Description
The background of the track when the disabled Switch is checked. | |||
$kendo-switch-on-track-disabled-text | $kendo-color-white | ||
Description
The text color of the track when the disabled Switch is checked. | |||
$kendo-switch-on-track-disabled-border | $kendo-switch-on-track-disabled-bg | ||
Description
The border color of the track when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-bg | $kendo-color-white | ||
Description
The background of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-text | inherit | ||
Description
The text color of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-border | inherit | ||
Description
The border color of the thumb when the Switch is checked. | |||
$kendo-switch-on-thumb-hover-bg | $kendo-color-white | ||
Description
The background of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-hover-text | inherit | ||
Description
The text color of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-hover-border | inherit | ||
Description
The border color of the thumb when the hovered Switch is checked. | |||
$kendo-switch-on-thumb-disabled-bg | k-get-theme-color-var( neutral-20 ) | ||
Description
The background of the thumb when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-disabled-text | inherit | ||
Description
The text color of the thumb when the disabled Switch is checked. | |||
$kendo-switch-on-thumb-disabled-border | k-get-theme-color-var( neutral-20 ) | ||
Description
The border color of the thumb when the disabled Switch is checked. |