--- name: animation-on-scroll description: Create an on-scroll animation trigger using IntersectionObserver with Tailwind-friendly animation classes and keyframes. Use when asked for scroll-reveal, animate-on-scroll, or sequencing element animations when they enter the viewport. --- # Animation On Scroll Skill ## Workflow 1. Confirm animation style, timing, and whether animations should run once or repeat. 2. Provide the keyframes + JS observer snippet and the exact Tailwind class to apply. 3. Offer focused tweaks only (threshold, rootMargin, duration, delay, transform/blur values). ## Usage checklist - Insert the JS snippet in the `
` after the keyframes. - Add the animation class and `animate-on-scroll` to elements. - Ensure your keyframes name matches the Tailwind animation reference. ## IntersectionObserver trigger ```html ``` ## Keyframes ```html ``` ## Tailwind example ```html