toggle-spring

Installation
SKILL.md

toggle-spring

A switch whose knob springs across on toggle. Part of motion-anything; obeys MOTION-SPEC.md.

When to use it

  • On/off switches in settings and forms; any binary state the user flips themselves.

When NOT to use it (restraint)

  • To convey loading/progress (use a spinner/skeleton). Keep the overshoot subtle, not gimmicky.

How to apply

  1. Copy toggle-spring.css and toggle-spring.js and link them.
  2. Markup: <button class="ms-toggle" data-toggle aria-pressed="false"><span class="knob"></span></button>.

Accessibility & performance

  • prefers-reduced-motion: quick linear slide, no overshoot. aria-pressed reflects state. Transform only.
Installs
1
GitHub Stars
805
First Seen
9 days ago
toggle-spring — nexu-io/motion-anything