Skill library

Agent skill Web motion

Motion

Design, implement or review motion on the web.

  • Animation

Install the skill

Installation method

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

npx skills@latest add raphaelsalaja/skills --skill motion --agent claude-code --yes

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

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add raphaelsalaja/skills --skill motion

    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. A running popover, a known animation mechanism, and a way to emulate reduced motion.

View operation manual

What this skill helps with

  • Design, implement or review motion on the web.

Good for

  • Web motion and transitions
Publisher
Raphael Salaja
Shipped tools or recipes
recipes.md
Result
A popover transition with a short exit and working keyboard and reduced-motion behavior.
Skill name
motion

Common pitfall

Avoid this prompt

Apply transition: all with the same long duration to open and close.

Extra properties may animate and a long exit can delay feedback. The source recipe uses named properties and a shorter close.

Use these steps

  1. Find what mounts the popover, where focus moves, and what keeps it interactive.
  2. Use project tokens or the recipe’s 200ms enter and 150ms exit, with zero delay on close.
  3. Check rapid toggles, keyboard dismissal, and reduced-motion interaction in the browser.

Hands-on walkthrough

Set a short enter and exit, preserve the existing open and close behavior, and verify interrupted and reduced-motion transitions.

Set a short enter and exit, preserve the existing open and close behavior, and verify interrupted and reduced-motion transitions.

  1. Trace the open and close lifecycle

    Find what mounts the popover, where focus moves, and what keeps it interactive.

    Prompt · Step 1
    Use the Motion skill on [popover and trigger]. Open the running page and record initial state, entry and exit duration, animated properties, and focus behavior. Inspect the component’s existing mount or presence mechanism and the project motion tokens. Read the installed recipes.md sections on curves, durations, and exits.
  2. Tune the transition

    Use project tokens or the recipe’s 200ms enter and 150ms exit, with zero delay on close.

    Prompt · Step 2
    Update the existing popover transition using project motion tokens. Where none exist, use the recipe’s ease-out with 200ms entry and 150ms exit. Name the exact animated properties. Use the component library’s supported presence or CSS state hooks so the exit can finish and closed content becomes non-interactive. Keep opacity feedback under prefers-reduced-motion and remove spatial movement and delays.
  3. Verify reversals and focus

    Check rapid toggles, keyboard dismissal, and reduced-motion interaction in the browser.

    • A rapid reopen finishes in the intended state.
    • Keyboard behavior and reduced-motion mode work in the actual interface.
    Prompt · Step 3
    Open and close the popover normally, then reopen before exit completes. Verify the final visible state and that closed content cannot receive clicks. Test Escape, focus return and keyboard access. Emulate prefers-reduced-motion: reduce and confirm the spatial motion is removed. Report observed behavior and where timings were read.

Workflow lookup

Find the local files and calls used in the walkthrough.

Set popover timingIncluded
Command or reference
recipes.md#curves-and-durations
Examples
Use a 200ms enter and 150ms exit with the same ease-out family when project values are absent.
Keep exit playableIncluded
Command or reference
recipes.md#exits
Examples
Use the project animation lifecycle to retain the exiting element for the transition.

FAQ

Should a popover slide under reduced motion?

Use an opacity transition and remove slides, scaling, blur, and delays. Retain the existing interaction and focus behavior.

Where are the installed files?

Open the project skill directory reported by the installer. The files referenced by this walkthrough sit alongside the skill’s SKILL.md.