MengTo / Skills
animation-on-scroll
Use when you need scroll-driven motion that feels intentional instead of noisy or overdone.
Install
npx skills add https://github.com/MengTo/Skills --skill animation-on-scrollAnimation On Scroll Skill
Workflow
- Confirm animation style, timing, and whether animations should run once or repeat.
- Provide the keyframes + JS observer snippet and the exact Tailwind class to apply.
- Offer focused tweaks only (threshold, rootMargin, duration, delay, transform/blur values).
Usage checklist
- Insert the JS snippet in the
<head>after the keyframes. - Add the animation class and
animate-on-scrollto elements. - Ensure your keyframes name matches the Tailwind animation reference.
IntersectionObserver trigger
Keyframes
Tailwind example
Customization knobs
- Trigger: adjust
thresholdandrootMarginfor earlier/later reveals. - Repeat: set
once = falseto allow replays when re-entering. - Motion: tweak
translateYandblurin keyframes. - Timing: change duration and delay in the Tailwind animation value.
Common pitfalls
- Forgetting to include the keyframes before the JS snippet.
- Using a different keyframe name than in the Tailwind animation.
- Animations not running because the element is already in view before observer init.
Questions to ask when specs are missing
- Should animations run once or every time the element re-enters?
- How far before entering the viewport should they start?
- What motion style (fade, slide, blur, scale) do you want?