Description
Scroll Btween is a small JavaScript library that ties CSS values to scroll position. You add an attribute to an element and describe the start and end values in data attributes, and the element's CSS changes as it moves through the viewport. It can drive the effect from the document scroll or from any DOM element, and it can tween several CSS properties on one element at the same time. You can also add several tweens on the same property. It is written in native JavaScript with no dependencies. The author's demo page shows parallax images, background position effects, image reveals, page progress bars and text slide effects. The project lists support for Chrome, Safari, Firefox and Opera on desktop and mobile, and for Chromium browsers such as Vivaldi and Brave. Usage notes and examples are on the site, and the source is open on GitHub.…
Highlights
- Tweens CSS values from the element's viewport position
- Works with the document scroll or any DOM element
- Several properties and tweens on one element
- Native JavaScript with no dependencies
- Demos for parallax, image reveals and page progress
Ratings & Reviews
No ratings yet
Be the first to rate Scroll-Btween.
People also visit
Scroll-Btween FAQ
What is Scroll Btween?
A JavaScript library that tweens CSS values on a DOM element based on where it sits in the viewport, so the page reacts as you scroll.
Does it need other libraries?
No. It is native JavaScript with no dependencies.
Which browsers does it support?
The project lists Chrome, Safari, Firefox and Opera on desktop and mobile, and Chromium based browsers such as Vivaldi and Brave.
How do I use it?
Add the scroll-btween attribute to an element and describe the values to tween in data attributes. The site has a usage guide and examples for effects such as parallax and text slides.
Where is the code?
On GitHub, in the olivier3lanc Scroll-Btween repository.
What are the best Scroll-Btween alternatives?
Popular alternatives to Scroll-Btween include Scroll Into View If Needed, SSGOI and Unity Tweens. See all Scroll-Btween alternatives







