Data-on-scroll functionality with optimized scroll detection
Scroll down to see real-time scroll position updates:
Position: px
Activity:
Fixed indicators that respond to scroll direction (like the comparison demo):
Scroll up and down to see the indicators change on the right side!
A progress bar that fills as you scroll:
Page Progress:
Different throttle settings for performance optimization:
Very responsive
Balanced performance
Best for performance
Elements that move at different speeds based on scroll:
Moves slower than scroll
Y Offset:
Moves with normal scroll
Y Offset:
Moves faster than scroll
Y Offset:
Elements that animate when they come into view:
This box fades in when you scroll to it.
This box scales in when visible.
This box slides in from the side.
scroll.x
- Horizontal scroll position scroll.y
- Vertical scroll position scroll.direction
- 'up', 'down', or 'none' scroll.velocity
- Scroll speed in px/s scroll.page_progress
- Page scroll % (0-100) scroll.visible
- Element in viewport Scroll up detected
Scroll down detected