Toggle Spring
Designtoggle-springToggle Spring is an Agent Skill for design published in the nexu-io/motion-anything repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
A switch whose knob springs across on toggle — a tactile, satisfying on/off state change. Use for settings/form switches. Honors prefers-reduced-motion (quick linear slide). Trigger on user intent only; keep the spring subtle — never to convey loading/progress.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/nexu-io/motion-anything/blob/HEAD/recipes/web/toggle-spring/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/toggle-spring, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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
- Copy
toggle-spring.cssandtoggle-spring.jsand link them. - 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-pressedreflects state. Transform only.