Directional Scroll Scenes for Bricks
A scene pins a full-screen stage to the window and brings each child in as a slide while the visitor scrolls. Scrolling back plays it in reverse.
Version: 0.1.0 · Requires: Bricks Builder, WordPress 6.5+ and PHP 8.1+ · See the live demo
Please note: this is an early release. It has been run on this playground but not yet tested widely, so stage & back up before using it on a live site.
Using it
- Add Directional Scroll Scene and put one Block or Container inside for each slide.
- Give each slide an opaque background so the slide beneath is covered.
- Choose an entrance effect and how much scrolling each slide takes.
Controls
- Entrance effect: slide, fade, zoom in, zoom out, blur, tilt, rotate, flip on X, flip on Y or split reveal. Slide also has a direction: from below, above, left or right.
- Scroll per slide: 0.25 to 10 screen heights. Total scroll length is one screen plus one step for each later slide.
- Scrub smoothing: 0 to 5 seconds of easing behind the scrollbar. 0 ties it directly to scrolling.
- Offset from top for sticky headers, and scene and slide backgrounds and padding.
Behaviour
The first slide is already visible when the scene pins. Each later slide animates in over it. It uses CSS sticky and a small vanilla script, so no animation library is loaded. Reduced motion, no JavaScript and the builder canvas show the slides one after another.
Limitations
- No ancestor may have
overflow: hidden. - Slides fill the screen height, so long content inside a slide needs to fit or it is clipped.
Scripting
window.DSS.refresh() sets up scenes added after page load.
Changelog
- 0.1.0 — first release.