Agent skill Web motion
Scroll Reveal Libraries
Design or implement effects that respond to scrolling on a web page.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/freshtechbro/claudedesignskills/tree/main/plugins/bundles/animation-components/skills/scroll-reveal-libraries --skill scroll-reveal-libraries --agent claude-code --yesCheck this file in your project.claude/skills/scroll-reveal-libraries/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/freshtechbro/claudedesignskills/tree/main/plugins/bundles/animation-components/skills/scroll-reveal-libraries --skill scroll-reveal-librariesSelect 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 existing feature grid and a browser route where AOS initialization can live for the page’s lifetime. This walkthrough targets AOS 2.3.4. The skill mentions aos@next, which is a separate dist-tag.
View operation manualWhat this skill helps with
- Design or implement effects that respond to scrolling on a web page.
Good for
- Scroll-driven storytelling
- Publisher
- FreshTechBro
- Compatibility
- This walkthrough targets AOS 2.3.4. The skill mentions aos@next, which is a separate dist-tag.
- Scenario
- Reveal a below-the-fold feature grid once
- Skill name
scroll-reveal-libraries- Repository
freshtechbro/claudedesignskills
Common pitfall
Avoid this prompt
Add data-aos to every card and hide them before the browser script loads.
A failed script can leave the cards hidden. Repeated AOS initialization can also add global listeners on a remounting route.
Use these steps
- Choose a below-the-fold grid and keep the initial content and controls visible.
- Load the AOS package and styles, then gate motion while leaving content available.
- Test scroll direction, re-entry, motion preferences, and an unavailable library.
Hands-on walkthrough
Use the documented AOS 2.3.4 CSS and initialization on a single page, with static fallbacks for all content.
Use the documented AOS 2.3.4 CSS and initialization on a single page, with static fallbacks for all content.
Plan the static and animated content
Choose a below-the-fold grid and keep the initial content and controls visible.
Prompt · Step 1Use Scroll Reveal Libraries on [feature grid]. Inspect the app’s resolved AOS version if installed and choose a page-lifetime AOS owner. Keep headings and interactive content readable in static markup. Pick decorative elements in the grid for fade-up and decide how to render without JavaScript and with reduced motion.Initialize AOS once
Load the AOS package and styles, then gate motion while leaving content available.
Prompt · Step 2Use AOS 2.3.4 for this example and load aos/dist/aos.css with the app’s styles. Add data-aos="fade-up" to the chosen decorations and initialize AOS.init({ once: true, duration: 350 }) once for the document after the HTML is ready. Keep targets visible until initialized with a local CSS override, and use a reduced-motion rule to remove movement and make all targets visible.Check one-time entry and fallback
Test scroll direction, re-entry, motion preferences, and an unavailable library.
- The decorations animate once and reachable content remains visible with scripts blocked.
- Reduced-motion and keyboard navigation work on the page.
Prompt · Step 3Scroll the grid into view, past it, and back. Verify the decorative fade plays once and reading and tab order stay unchanged. Repeat with reduced motion and block the library script while retaining CSS to check the visible fallback. If you inserted targets after initialization, use AOS.refreshHard() when the installation’s mutation observer is unavailable or disabled. Report tested states.
Workflow lookup
Use the documented calls with the version selected for the walkthrough.
Reveal once on scrollAPI
- Command or reference
data-aos="fade-up" · AOS.init({ once: true, duration: 350 })- Examples
- Apply to the decorative targets and set up the library once per document.
Refresh cached positions or find new nodesAPI
- Command or reference
AOS.refresh() · AOS.refreshHard()- Examples
- Use refresh for offsets and refreshHard when the target list must be rebuilt.
FAQ
How should this work on a route with frequent remounts?
In AOS 2.3.4, use one document-level initializer and update the target list as needed. The documented public API provides init, refresh, and refreshHard.
Where are the skill materials?
Open the project skill folder printed by the installer for SKILL.md and any bundled resources. The app’s runtime libraries are managed separately in its own package manifest.