159

Cut-out Breakout Zoom

£7
or the whole Vault, £99

Pinned scroll section where a cut-out dancer spins through twelve frames per turn as you scroll, with silk that keeps moving, in front of a huge headline while a narrow card opens to full bleed behind her.

ScrollTrigger advanced
7 more details
pinningscrubzoomclip-pathimage-sequencewebgl-shaderscroll-storytelling

Released

About this effect

A pinned scroll chapter where the subject really turns. A narrow card sits at the back of the stage, a huge headline runs across it, and a cut-out dancer stands in front of both, with her hands above the card and her silk flaring over its sides. As the visitor scrolls she spins through twelve frames per turn, a pirouette that quickens as the card opens behind her and slows into the landing, while she comes forward out of the opening window. The skirt keeps moving through a small WebGL ripple that travels around the silk, breathes at rest and picks up with scroll speed, while her face, hands and feet stay exactly as photographed.

Read the full effect overview

The headline tracks outward, then slides behind her and is gone as a closing heading and paragraph arrive. It all lands exact: the plate at 1:1 and full bleed, the subject upright on her opening frame. The demo is a dancer on cobalt, and any subject shot or generated in the same frame works, or a single cut-out with no spin at all. Without WebGL, under reduced motion or if the context is lost, the plain images take over and nothing else changes. The plate can be a muted looping video, and the section can be repeated down a page, each copy with its own pictures and words.

Cut-out Breakout Zoom - GSAP animation effect preview

What's included

11 items
  • A real spin, not a tilt: scrolling turns the subject through twelve aligned frames per revolution, two full revolutions by default, opening and landing on the same frame
  • Silk that keeps moving: a small ripple travels around the skirt, reacts to scroll speed and leaves the face, hands, arms and feet untouched, and the sheen carries from one frame to the next
  • The turn quickens in the middle of the card opening and slows into the landing, so the last revolution feels as if it is settling
  • Whole-body rotation and a silk-driven swell carry the speed between frames, then die away to exactly upright at the end
  • Frames stay registered on the subject's hips and skirt through offsets you can measure for your own set, so she turns on the spot rather than jittering sideways
  • Three real layers: the card at the back, the headline in the middle and the subject in front, with every silhouette crossing the words and the line staying readable
  • The card opens to exactly full bleed by clipping a picture already at its final size, so it is never scaled and lands pixel-sharp
  • Every frame is ready before the pin begins, so a cut can never flash blank; screen shapes that need it settle her higher and smaller to leave the payoff clear, with no scrim
  • Plate slot takes an image or a muted looping video; copies on one page run independently, each with its own settings
  • Reduced-motion, no-JS and blocked-CDN visitors get a composed static layout on the front frame with every word readable and no pin
  • Image quality held: the canvas draws at display resolution with correct alpha, and any browser without WebGL shows the same frames as plain images

Perfect for

5 use cases
  • Dance, theatre and music pages where one person in motion should carry the section
  • Fashion and campaign pages built around a single cut-out model or product shot
  • Sports and fitness landing pages that want the athlete to break out of the frame
  • Long-form stories using the same section as repeated chapters, each with its own photograph
  • Product launches with a clean cut-out of the object standing over a loud headline

How it works

2 sections

A pinned ScrollTrigger scrubs a single timeline through the section, so the composition is a pure function of scroll position and reverses exactly. The backdrop and the cut-out share one picture frame, so they always line up, and the backdrop stays sharp because it is revealed rather than scaled. The figure comes forward while a stack of aligned frames plays out, and it lands upright on its opening frame.

One small WebGL canvas draws the visible frame and moves only the skirt, with one draw call a frame and only while the section is on screen. The images stay in place underneath as the fallback. The starting composition adapts to the stage whenever the layout changes, so it holds at phone, laptop and ultrawide shapes. Touch screens get a shorter pin, and reduced-motion visitors a static layout with no pin at all.

Plugins ScrollTrigger
Difficulty Advanced
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Lighthouse, as measured

Google Lighthouse on this effect's demo, from the latest scan. A measurement of the demo as shipped, not a promise for your page.

Accessibility
100
Best practices
100

No performance score, on purpose. That figure depends on how you deploy: your server's compression and caching, your CDN, the connection and the device doing the test, none of which the code controls. The same page can score very differently on two consecutive runs, so measure it where it will live.

The Vault opens this source and the whole library.

Each product gives you the HTML, CSS and JavaScript source, the full documentation and an AI setup prompt, licensed for unlimited personal and commercial projects. Every paid product is tested for desktop and mobile layouts, reduced-motion handling, animation cleanup and keyboard controls wherever there is something to operate.

One payment, over 300 products, and future additions to the library.

Documentation

Quick Start

1. Add to your HTML <head>:

In your downloadThe working code for this step, in index.html.

2. Add before the closing </body> tag:

In your downloadThe working code for this step, in index.html.

3. Add the section anywhere in your <body>:

In your downloadThe working code for this step, in index.html.

Using It With Your Own Design

What the effect needs from your markup: .cbz as the root, .cbz-stage inside it, and inside that .cbz-plate, .cbz-headline and .cbz-figure. Each image in .cbz-figure is one frame of the turn, in order: the first is the one she opens and lands on, and the only one shown without the scrub. A single image is also valid, and she then comes forward with no spin. .cbz-payoff is optional, and each of its direct children rises in turn. Everything is looked up inside the root, so you can repeat the section on one page with different pictures, words and settings. The headline can be any heading level. Its text is split into letters by the script, and the real text stays in place, visually hidden, so the accessible name does not change.

What is only the demo's styling: the Anybody typeface, the navy and warm white (--cbz-ground, --cbz-ink), the type sizes and the corner radius.

CSS the effect depends on: keep the .cbz-canvas and .is-live rules, the stage height and overflow: hidden, container-type: size on the stage (the shared frame is sized from it), the frame variables and rules on .cbz-figure and .cbz-media, the z-index order, and the .has-js block at the end of the stylesheet. That block is the start state and is what stops the page flashing the finished layout. The base rules without it are the static layout that no-JS and reduced-motion visitors see.

Swapping the picture

The plate takes any image or video, and the frames take images. The plate can be a muted looping video in one line:

In your downloadThe working code for this step, in index.html.

The script reads the picture's shape from the file, or from width and height until it has loaded, so always set both.

Making a plate and a cut-out from any photograph

You need two files with exactly the same pixel dimensions.

  1. Cut-out layer. Lift the subject with macOS Vision (in Photos or Preview, or the VNGenerateForegroundInstanceMaskRequest API) or a background remover. Keep the full canvas with transparency around the subject. Do not crop to the subject. Export WebP or PNG with alpha.
  2. Plate. The same photograph with the subject removed, using generative fill or a clone tool. A plain backdrop can simply be regenerated at the same size.
  3. Clean the edge. A photograph leaves a thin rim of its old background on the subject, and it shows as soon as she crosses the headline or the dark ground. Choke the mask by a pixel or two and remove the colour spill. View it at 2x over white and over your stage colour.

Why they must share one frame size: at the end of the scrub both layers sit at 1:1 in one shared frame and crop the same way, so the subject lands exactly where she stands in the photograph. If the sizes differ, she floats away from her own contact shadow, floor or surroundings on the last frame.

Subjects standing on something. Below a 3:2 screen shape the cut-out's frame is smaller than the plate's, through --cbz-figure-h, so she settles higher and leaves room for the payoff. That suits a subject in the air on a plain backdrop. If yours stands on a floor in the plate, set --cbz-figure-h: var(--cbz-frame-h) on .cbz for those shapes and place the payoff yourself.

Tell the effect where she is. data-cbz-subject gives her bounding box in the picture as fractions of its width and height. The starting scale, the card and the turning point are all worked out from it. Measure it in any image editor.

Making a turn

A turn is a set of stills of one subject, one revolution, in order, starting and ending on the same pose. Twelve frames, about 30 degrees apart, read close to video, and six also work as a harder stop-motion cut. All frames together are the page weight of the effect, so keep each to about 70 KB.

  • Same frame, same subject. Every frame has the same pixel dimensions, the same framing and the same distance to camera. Lock the camera, and have the subject turn on a mark. Keep the same backdrop so that the cut-outs clean up the same way.
  • Generating frames. Give the image model your front frame as the reference and ask for the same person, same clothes, same light and same framing, with only the angle changed. Reject any frame where the proportions drift, and check hands and feet at full size.
  • Cut each frame out the same way. Follow the steps above and keep the transparent canvas at full size. If one frame's edge is cleaner than the rest, the difference shows when you cut between them.

Measuring the offsets

No two frames put her hips in the same place, so she would jitter sideways. data-cbz-offset on each frame moves it into line with the first.

  1. Open the frames as layers in any image editor. In each one, note the centre of the waistband in pixels, and where the skirt's mass is centred. A large skirt counts: a blend of about two thirds waist and one third skirt works better than the waist alone.
  2. For each frame, take the first frame's point minus this frame's point, and divide by the frame size: x = (frontX - thisX) / frameWidth, y = (frontY - thisY) / frameHeight.
  3. Write the pair on the frame, for example data-cbz-offset="0.0114 -0.0043". The first frame needs none.
  4. Check it: scroll slowly through every cut at full size and watch her hips. They should hold still while everything else changes.

Offsets are fractions of the frame, so they hold at every screen size.

The silk

A small WebGL canvas draws the visible frame and moves the skirt. There is nothing to wire up: it uses the frames you supplied.

  • What moves. A low-frequency ripple travels around the skirt, in the picture's own pixels: about 2.5 at rest and up to about 6 at full scroll speed. It moves colour and edge together, so the hem itself moves. Just before each cut, the skirt's sheen starts to carry over to the next frame, but its outline stays this frame's, so a hem can never double or go see-through.
  • What never moves. Everything above the waist and at the feet is exactly as photographed. data-cbz-silk-zone says where that is, as fractions of the frame: the waist line, the line just above the feet, and the hips' axis. Check yours by setting data-cbz-silk-amp="24" and scrolling to the end: the ripple should reach the skirt and nothing else.
  • Your frames must be same-origin, or served with CORS headers and crossorigin="anonymous" on each image. If the browser will not hand the pixels over, the plain images stay in charge.
  • Other subjects. It suits loose cloth, hair or water. On something rigid, turn it off with data-cbz-silk="off".

Fallback

The images stay in the stack, and keep cutting underneath the canvas. Until the canvas is live they are what you see, and the first frame looks the same in both. With no WebGL, or if the context is lost, you get hard cuts through the same frames, with nothing else changing. If the context comes back, the silk does too. Reduced motion shows the first frame alone, with no canvas.

Choosing the crop

Both layers crop together through two variables on .cbz, as fractions from 0 to 1. For example, to keep her in shot on phones:

In your downloadThe working code for this step, in style.css.

Options

Attribute Values Default Description
data-cbz-distance Number 2.8 Pin length in viewport heights. Touch screens use 72% of this.
data-cbz-scrub Seconds, 0 or more 1 How long the animation takes to catch up with the scroll.
data-cbz-turns Whole number 2 Full revolutions through the frames. 0 holds the first frame.
data-cbz-sway Degrees 4 Her whole-body lean in the first frame, and the rotation that carries her between cuts. 0 turns it off.
data-cbz-silk on, off on The WebGL silk. off keeps plain images with hard cuts.
data-cbz-silk-amp Source pixels 2.5 The ripple at rest. It reaches 2.4 times this at full scroll speed. 0 holds still.
data-cbz-silk-blend 0 to 1 0.35 The last share of each frame's interval in which the sheen carries to the next. 0 turns it off.
data-cbz-silk-zone waist feet axis 0.41 0.82 0.48 Where the silk lives, as fractions of the frame. Nothing above the waist line or below the feet line ever moves.
data-cbz-offset x y, on a frame none Moves that frame into line with the first, as fractions of the frame. See Measuring the offsets.
data-cbz-subject left top width height 0.218 0.012 0.567 0.916 The subject's bounding box in the first frame, as fractions.
data-cbz-fill 0 to 1 0.74 How much of the stage height she fills in the first frame.

Accessibility

  • Reduced motion: a static layout with no pin, on the first frame only. The other frames are not downloaded. The picture fills the screen and the headline and payoff are placed clear of the subject. If the preference changes while the page is open, the section switches over and restores itself.
  • No JavaScript or a blocked CDN: the same static layout.
  • Headline: stays a real heading with its full text. The split letters are aria-hidden.
  • Images: give the first frame useful alt text, and leave the plate's and the other frames' alt empty.
  • Contrast: the payoff text clears 4.5:1 on the plate in the demo at each screen shape, with no scrim, and the spin has landed before it appears. Check it again with your own picture.
  • Motion: the ripple keeps breathing while the section is on screen, and stops when it is off screen. It never runs under reduced motion.
  • Touch: a shorter pin. On portrait screens she fills the width, the headline stacks on two lines behind her, and she settles higher so the payoff sits clear below her.

Performance

One canvas, one draw call a frame, only while the section is on screen. Twelve frames at 1672x941 hold about 75 MB of graphics memory per copy on the page, so if you repeat the section, use fewer frames or data-cbz-silk="off" on later copies. Canvas resolution follows the display, capped at 2x. Frames upload one per paint, before the pin begins, and everything is released on revert().

Dependencies

GSAP owns the pin, the scrub and matchMedia. The canvas runs on raw WebGL with no library, reading scroll velocity for the ripple, and uses the GSAP ticker as its clock.

Required:

  • GSAP 3.12+
  • ScrollTrigger plugin

Optional:

  • WebGL, for the silk

The demo is pinned to GSAP 3.15.0. Size-container units (cqw, cqh) need a browser from 2023 or later.

Also in your download: the full source, worked examples, the events and programmatic API, and the class reference.

£7