Skill library

Agent skill Web motion

Motion Foundations

Design, implement or review motion on the web.

  • Animation
  • Accessibility

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add affaan-m/everything-claude-code --skill motion-foundations --agent claude-code --yes

Check this file in your project.claude/skills/motion-foundations/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add affaan-m/everything-claude-code --skill motion-foundations

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. An SSR React project and the current motion dependency compatible with its React version. The installed Skill provides SKILL.md examples for project-local tokens and helpers.

View operation manual

What this skill helps with

  • Design, implement or review motion on the web.

Good for

  • Web motion and transitions
Publisher
affaan-m
Control points
motionTokens.duration.fast · motionTokens.scale.press · initial={false}
Result
A shared duration and press scale, server-visible feedback, and a reduced-motion path.
Skill name
motion-foundations

Common pitfall

Avoid this prompt

Hide the entire card for the first render and check window.matchMedia at module load.

The first HTML can become unreadable, and reading browser APIs during module initialization can fail during SSR.

Use these steps

  1. Inspect the original target
  2. Apply the documented technique
  3. Verify the result in the project

Project walkthrough

Centralize two motion decisions on one server-rendered action and keep it usable before hydration.

Centralize two motion decisions on one server-rendered action and keep it usable before hydration.

  1. Inspect the original target

    Inspect the original target

    Prompt · Step 1
    Use Motion Foundations on [my save-note action]. Find the existing motion token module, SSR-visible content, current package, and state announcement. Read the Skill’s token, spring, and runtime-gate examples. Identify which feedback needs animation and which status must update immediately.
  2. Apply the documented technique

    Apply the documented technique

    Prompt · Step 2
    Use motion/react for this app’s current Motion components. Centralize the short fade in motionTokens.duration.fast and press scale in motionTokens.scale.press, adapting existing tokens if present. Run the useReducedMotion or device-policy branch only in browser-safe code. Keep first render visible with initial={false} when appropriate, preserve the real button, and remove press transforms under reduced motion.
  3. Verify the result in the project

    The first HTML stays visible and the same action updates status in both normal and reduced motion.

    • The first HTML stays visible and the same action updates status in both normal and reduced motion.
    Prompt · Step 3
    Inspect the generated initial HTML and then hydrate the same markup. Press the button normally and inspect the token-controlled feedback. Repeat in a fresh load with reduced motion active before mounting. Confirm no hydration errors, visible status, and no spatial press transform in that mode.

Implementation lookup

Find the documented controls and a way to test the implementation.

Check the values and controlsInputs
Command or reference
motionTokens.duration.fast · motionTokens.scale.press · initial={false}
Examples
The first HTML stays visible and the same action updates status in both normal and reduced motion.

FAQ

Where do the motion tokens come from?

The Skill documents a module shape. Add the values to your project’s own motion tokens or adapt compatible existing tokens.

Where are the examples?

Start with the installed SKILL.md and open any linked rule or reference file listed by this walkthrough.