Agent skill Web motion
Web Motion Design
Design, implement or review motion on the web.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/dylantarre/animation-principles/tree/main/skills/01-by-domain/web-motion-design --skill web-motion-design --agent claude-code --yesCheck this file in your project.claude/skills/web-motion-design/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/dylantarre/animation-principles/tree/main/skills/01-by-domain/web-motion-design --skill web-motion-designSelect 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 accessible existing button, a decorative inner element, and a browser that can inspect CSS transforms.
View operation manualWhat this skill helps with
- Design, implement or review motion on the web.
Good for
- Web motion and transitions
- Publisher
- dylantarre
- Control points
- :active · transform: scale(x, y) · transform-origin · prefers-reduced-motion
- Result
- A short visual press with stable target geometry and a static reduced-motion presentation.
- Skill name
web-motion-design- Repository
dylantarre/animation-principles
Common pitfall
Avoid this prompt
Animate the entire button layout, remove its focus outline, and trigger the state only on hover.
Target geometry can shift and touch or keyboard users can lose access to the feedback or action.
Use these steps
- Inspect the original target
- Apply the documented technique
- Verify the result in the project
Project walkthrough
Add one CSS squash-and-stretch treatment to an existing control while retaining native button behavior.
Add one CSS squash-and-stretch treatment to an existing control while retaining native button behavior.
Inspect the original target
Inspect the original target
Prompt · Step 1Use Web Motion Design on [my Add label button]. Record the current accessible name, focus style, touch target size, and status change. Choose a noninteractive inner decoration for the squash-and-stretch cue.Apply the documented technique
Apply the documented technique
Prompt · Step 2Use a CSS :active selector on the real button to scale the inner decoration, compressing one axis and expanding the other slightly. Use transform with a stable origin and a short 100–200ms easing. Keep the click action and a visible keyboard focus indicator. Under prefers-reduced-motion: reduce, remove the spatial transform and retain an immediate visible pressed cue.Verify the result in the project
The inner decoration transforms during a press while the outer control bounds and keyboard action remain stable.
- The inner decoration transforms during a press while the outer control bounds and keyboard action remain stable.
Prompt · Step 3Press and release the button and inspect the inner element’s computed transform and outer button’s bounding box. Repeat the action with the keyboard at narrow width, check focus, and emulate reduced motion. Report which visual property changes and whether the outer target moves.
Implementation lookup
Find the input and the expected observation for the selected workflow.
Check the control pointsInputs
- Command or reference
:active · transform: scale(x, y) · transform-origin · prefers-reduced-motion- Examples
- The inner decoration transforms during a press while the outer control bounds and keyboard action remain stable.
FAQ
How can a touch click keep its feedback?
Use the real button’s active state and preserve an immediate visual state change even when spatial motion is disabled.
Where can I verify the version?
Open the publisher’s pinned Skill source and compare the API references with the application’s lockfile.