Agent skill Web motion
Micro Interactions
Make interface behavior and feedback feel clear and intentional.
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/micro-interactions --skill micro-interactions --agent claude-code --yesCheck this file in your project.claude/skills/micro-interactions/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/micro-interactions --skill micro-interactionsSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use HTML and CSS with the real native input and a decorative SVG path inside its label.
View operation manualWhat this skill helps with
- Make interface behavior and feedback feel clear and intentional.
Good for
- Interaction and feedback
- Publisher
- dylantarre
- Controls
- input:checked · stroke-dasharray: 20 · stroke-dashoffset · 200ms / 50ms
- Result
- The real checkbox toggles immediately and the decorative stroke follows its state.
- Skill name
micro-interactions- Repository
dylantarre/animation-principles
Common pitfall
Avoid this prompt
Use the SVG path as the checkbox and delay checked state until animation completes.
The native control handles labels, keyboard and form state immediately.
Use these steps
- Inspect the project and source
- Apply the motion recipe
- Verify behavior and fallback
Project walkthrough
Keep a native checkbox responsive and add a short, optional checkmark draw.
Keep a native checkbox responsive and add a short, optional checkmark draw.
Inspect the project and source
Use HTML and CSS with the real native input and a decorative SVG path inside its label.
Prompt · Step 1Use the hyphenated Micro Interactions Skill on [my Include chart setting]. Read the Checkbox recipe in SKILL.md. Preserve input type="checkbox", its label and visible focus. Measure the decorative checkmark path before adopting the sample length.Apply the motion recipe
Keep a native checkbox responsive and add a short, optional checkmark draw.
Prompt · Step 2Mark the decorative SVG aria-hidden. Set its dash array and starting offset to 20 for a matching path, and drive offset to 0 under :checked. Use the sample 200ms ease-out and 50ms delay as a starting point. Switch to the checked or unchecked pose immediately under reduced motion.Verify behavior and fallback
The real checkbox toggles immediately and the decorative stroke follows its state.
- The real checkbox toggles immediately and the decorative stroke follows its state.
Prompt · Step 3Toggle with Space, mouse and label touch. Inspect checked state immediately and dash offset after settling. Repeat with reduced motion and verify the actual form value follows input without waiting for the drawing.
Implementation lookup
Compare the implementation with the recipe and its expected outcome.
Inspect the implementation controlsVerify
- Command or reference
input:checked · stroke-dasharray: 20 · stroke-dashoffset · 200ms / 50ms- Examples
- The real checkbox toggles immediately and the decorative stroke follows its state.
FAQ
What should I prepare first?
Use HTML and CSS with the real native input and a decorative SVG path inside its label.
How do I verify the result?
The real checkbox toggles immediately and the decorative stroke follows its state.