Toggle

figma:ready
react:ready
scss:ready
freemarker:ready
vue:ready
webComponent:ready

Anatomy

specs

Properties

layout

sizeelementPropertyToken
M (Default)backgroundborder-radius2mu
M (Default)backgroundwidth4mu
M (Default)backgroundheight2mu
M (Default)foreground (circle)border-radius1.75mu
M (Default)foreground (circle)width1.75mu
M (Default)foreground (circle)height1.75mu
Sbackgroundborder-radius1.5mu
Sbackgroundwidth3mu
Sbackgroundheight1.5mu
Sforeground (circle)border-radius1.25mu
Sforeground (circle)width1.25mu
Sforeground (circle)height1.25mu

state colors

You must always use the tokens, the HEX colors are only there information purpose.

StateelementPropertyTokenColor
offbackgroundbackground-colorcolor.toggle.off.background#887f87
offcirclebackground-colorcolor.toggle.off.circle#ffffff
onbackgroundbackground-colorcolor.toggle.on.background#78be20
oncirclebackground-colorcolor.toggle.on.circle#ffffff
Focusbackgroundborder / box-shadowcolor.input.focus.border#25a8d0
Disabledbackgroundbackground-colorcolor.toggle.disabled.background#eeeef0
Disabledcirclebackground-colorcolor.toggle.disabled.circle#bab6bc

When disabled, an input field can never display any other state styles, and should not respond to any user interaction other than showing the related disabled cursor when user is hovering.