Scroll-driven Animation

You might say

I want the article's top progress bar to grow as I scroll down and shrink back when I scroll up, rather than playing on a timer once triggered.

An animation whose playback progress is tied directly to scroll position instead of elapsed time—pausing when you stop and reversing when you scroll back.Article reading progress bars and hero visuals that scale smoothly as you scroll down a product page are classic scroll-driven animations (using CSS animation-timeline: scroll() or view()). Unlike scroll-triggered animations that play to completion on a timer once visible, scroll-driven motion tracks scroll position 1:1. Always keep core text readable at every scroll offset, provide graceful fallback, and honor reduced motion.
animation-timelineScroll Timeline

You can say this to an AI Agent

Ready to paste into Cursor, Claude Code, or Codex
Structured AI Agent prompt

Add a reading progress bar at the top of the article page using a scroll-driven animation: map vertical scroll progress 0%–100% directly to `transform: scaleX()` via CSS `animation-timeline: scroll()` with a lightweight fallback for unsupported browsers. Verify scrolling down, pausing midway, scrolling back up, and behavior under prefers-reduced-motion.

Want your Agent to translate plain-language UI ideas automatically?Install free VibeHub Skill →
Oil UI Pro. Push AI’s design skills to the limit. Usability, existing projects and stricter review.
Further reading