Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollZoom-Out Frame on Scroll
Image Column StreamBrowse all 182Image Ring Burst
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Zoom-Out Frame on Scroll

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(ScrollTrigger)

More like this

  • Hero
  • Pinned
  • Section transition
  • Reveal
  • Zoom
  • ScrollTrigger
  • Sticky

Features.

  • A plain title page turns out to be the inside of a framed picture
  • The view pulls back until the frame is held in the middle of the screen, then on until the whole room shows
  • The pull runs in log space, so it feels even from five times life size down to one
  • The page is a separate layer over the picture, so its heading stays sharp at any scale
  • The picture's place in the photo is four CSS variables
  • Read straight from the scroll: no easing over time, and it runs backwards on the way up
  • Measured again on resize and once fonts load
  • Respects prefers-reduced-motion: just the room, no pull

How to get it right.

Tell it where the picture is

--plb-x, --plb-y, --plb-w and --plb-h are the picture's left, top, width and height as fractions of the photo. --plb-aspect is the photo's width divided by its height. Measure them once in an image editor.

Use two files

The picture fills the screen at the start, so it is its own sharp image laid over the photo. The demo's is 1040px wide. The photo is only seen from the held size outward, so it can be lighter.

Pick a flat, front-on spot

The picture is a plain rectangle. It sits best on a wall or a ledge that faces the camera. A spot seen at an angle would need the picture skewed to match.

Match the page to what comes before

--plb-page fills the panel (ink, #252422, under a fine grain, by default) and --plb-fg colours its heading. Give the panel the background of the section above and that section seems to be the picture.

Variations.

  • Longer pull — --plb-length: 340vh
  • Hold the picture larger or smaller — data-au-hold="0.7" or "0.4"
  • Spend longer on the first leg — data-au-split="0.65625"
  • Clear the page sooner or later — data-au-clear="0.1" or "0.5"
  • No title page — delete [data-plb-panel]; the view starts inside the picture itself
  • A different frame — --plb-frame sets its colour; its width is the inset on .plb_opening::before
  • A video in the frame — put a <video> with the plb_picture class in [data-plb-opening]

Where it fits.

  • Portfolios — out of one piece of work and into the studio wall it hangs on
  • Product pages — from a screen's content back to the device on a desk
  • Editorial — the end of a chapter becomes a picture in the next scene

Frequently asked.

No. It runs on native scroll, and with Lenis once Lenis updates ScrollTrigger.

Because it is enlarged: at the held size the picture is about half the screen wide, so the photo round it is shown at two to three times its size. Use a photo at least 2000px wide if that matters.

Under 700px the picture is held at 92% of the width, and on touch screens the page clears a little later. Both keep the frame readable on a small screen.

Yes. The stage unsticks at the end of the track and scrolls away like any section.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll