Scroll scenes
A scroll scene is a section that holds still while visitors scroll through it: its frame stays on screen and what is in it moves with the scroll, here a stack of layers that tilts back and comes apart in depth. The Pinned scene starter component builds one from ordinary elements, styles and an animation, all of which stay yours to change in the visual editor. Its 3D styles and motion are experimental: their names and ranges may still change.
How it is built
- The section is several screens tall. Inside it, a frame one screen high is sticky at the top, so it stays on screen until the section's end scrolls into view.
- The frame holds a text (slot Text) and a stage with a perspective, in which three layers (slots Top layer, Middle layer, Bottom layer) lie on one another.
- An animation, Scene: tilt and part the layers, follows the scroll (With the scroll): the stack tilts back by 50 degrees, the top layer comes 160 pixels closer and the bottom one goes 160 pixels back. Change the angles and depths in its Motion tab.
- A hidden marker tells the animation where the pinned stretch starts and ends: it starts as the section's top reaches the top of the screen and ends as its bottom reaches the bottom, whatever the section's length. The marker is empty, hidden from screen readers and can't be clicked; leave it where it is.
Lengths
Pick the length with the component's look (variant): Two, Three (the default), Four or Five screens
long. Each is a class on the Site styles screen (pinned-scene-2 to pinned-scene-5) setting the section's height.
A longer scene scrolls more slowly through the same movement; two screens is the shortest that pins at all, since the
frame itself takes one.
On a phone
On the narrowest width (below the first breakpoint, or at the narrowest one on a site that starts with the desktop) nothing is pinned and the animation doesn't play: the section is as tall as what is in it, the text comes first and the layers follow, one below the other. A turned stack on a small screen is hard to read and its scroll is easy to lose, so the phone gets the content in order.
Reduced motion
A visitor who asks their device for less motion gets the scene laid out as on a phone, at every width: nothing is pinned, the section is as tall as what is in it, and the layers follow the text. They show the end state at once, tilted back and apart, without movement as the page scrolls (the animation's For visitors who ask for less motion is Show the end at once). The layout is in each part's styles under the Reduced motion condition, where it can be changed like any other style.
Accessibility
The layers' words are ordinary text, read in order by screen readers whatever the animation shows. Keep links and buttons out of the turned layers, or check they stay readable at every point of the scroll: a layer turned away hides its back (Back side is hidden), and what sits behind another layer can't be clicked.