All components

Components · Controls

Checkbox

A checkbox with its label. The mark draws itself.

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

Use it

<Checkbox checked={hints} onChange={(e) => setHints(e.target.checked)}>
  Show hints
</Checkbox>

How it moves

WhenRoleWhat moves
Pressed down, releasedfeedbackThe box scales to the role's scale and back
Becomes checkedstate-changeThe box fills with the action color and the check mark draws itself from left to right
Becomes uncheckedstate-changeThe mark undraws and the fill fades back

Rules:

Reduced motion: the feedback scale is 1, so the box does not move. The mark and fill still change, over the shortest duration.

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