All components

Components · Controls

Toggle

An on and off switch for settings that take effect at once.

Try itChange the motion setting at the top to feel each personality.

Use it

<Toggle checked={on} onChange={(e) => setOn(e.target.checked)}>
  Daily reminder
</Toggle>

How it moves

WhenRoleWhat moves
Turned onstate-changeThe thumb slides to the right end of the track, and the track fills with the brand color
Turned offstate-changeThe thumb slides back and the track empties

Rules:

Reduced motion: the thumb still has to change sides, since that is the state. It moves over the shortest duration with no spring.

CSS variables used: --ss-motion-state-change-spring, --ss-motion-state-change-spring-duration, --ss-motion-state-change-duration, --ss-motion-state-change-easing.