Anatomy

  1. Track: a 52 by 32px pill with a 2px border.
  2. Thumb: a circle that slides from start to end.
  3. Label: the setting, worded so that on reads as true.
  4. Reason (optional): under a disabled switch, saying why.

Measurements

From the design’s stylesheet, each design token with the value kanso-ui gives it in light.

ClassPropertyValue
k-switchgap12px (space-md)
min-height48px (size-control-lg)
font400 15px/20px font-plain

Tokens used

Design tokenIn kanso-uiLightDark
paper--kui-color-paper#fafafa#121212
surface-sunken--kui-color-surface-sunken#f0f0f0#262626
ink--kui-color-ink#1a1a1a#ececec
on-ink--kui-color-on-ink#fafafa#121212
outline--kui-color-outline#8a8a8a#8c8c8c
focus-ring--kui-color-focus-ring#1a1a1a#ececec
radius-pill--kui-radius-kanso-pill999px999px
size-control-lg--kui-sizing-kanso-control-lg48px48px
space-md--kui-spacing-kanso-md12px12px
space-3xl--kui-spacing-kanso-3xl32px32px
state-disabled-content--kui-state-layer-opacity-kanso-disabled-content0.380.38
font-plain--kui-typography-font-family-plain'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
--k-motion-shortits own value——
--k-motion-mediumits own value——
--k-ease-standardits own value——
--k-ease-springits own value——