189

Paper Shredder Scroll

£7
or the whole Vault, £99

A pinned scroll section that feeds a real HTML document through a shredder slot: intact above the slot, hanging as fine swaying paper strips below it, then dropping away as the pin releases.

ScrollTrigger Lenis advanced
8 more details
pinningscrubimage-slicingvelocity-reactivespring-physicsviewport-aware-tickerreduced-motionprogressive-enhancement

Released

About this effect

A pinned section built around one gesture: scrolling feeds a document down into a shredder. Above the slot it stays a single, readable sheet; below the slot the same sheet hangs as fine vertical strips, each a real slice of the document lined up exactly with the text it was cut from. Scroll faster and the strips fan out, sway, curl and twist on their own springs; stop and they hang still; scroll back and the paper feeds up and rejoins into the intact sheet.

Read the full effect overview

Once the sheet has fully passed through, the strips drop away, the indicator light goes idle and the pin releases, leaving the empty shredder in place. The document is ordinary HTML (an itemised invoice in the demo), so the copy, figures and layout stay editable.

Paper Shredder Scroll - GSAP animation effect preview

What's included

9 items
  • Strips are cut from the document itself: each one is a clipped copy of the same HTML, aligned at the slot so lines of text continue across the cut
  • Shredder-fine by default: 28 strips on wider screens and 14 on phones, both adjustable
  • Per-strip springs for sway, a hinged curl and a slight twist, all driven by feed speed and settling to stillness when scrolling stops
  • Reversible: scrolling back feeds the paper up and the strips rejoin into the intact sheet
  • A steady slot housing with an indicator light that glows with feed speed and goes idle once the sheet is through
  • Data attributes for strip count (separate mobile count), scroll distance, sway, curl and slot position
  • Small API (refresh, revert) and shredstart / shredcomplete events
  • One ticker for every strip that sleeps at rest and offscreen; transforms and overflow clipping only
  • Lenis on GSAP's shared clock; reduced motion and no-JavaScript show the intact document

Perfect for

4 use cases
  • Pricing sections that shred the old, padded invoice before the new plan
  • Old way versus new way comparisons, where the old way is a form, contract or bill
  • Privacy and data pages that shred a sample record
  • Product launches that retire a legacy process, such as paperwork, timesheets or terms

How it works

2 sections

One pinned ScrollTrigger reports progress, and a single GSAP ticker eases towards it. The intact sheet moves down inside a window that ends at the slot line, so whatever has gone into the slot is clipped away. Below the slot, the script cuts the sheet into strips: each strip is two hinged pieces, and each piece clips a copy of the sheet to that strip's column, moved by exactly the same amount as the original, which is why the text lines up across the cut.

Feed speed becomes an energy value that drives each strip's spring targets with its own phase and frequency, so the strips sway and curl independently, then settle when the energy fades. After the feed completes, the strips drop with a stagger and the indicator dims. Everything is written as transforms, and the ticker removes itself once every spring is at rest.

Plugins ScrollTrigger
Difficulty Advanced
Smooth scroll Lenis integration
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 350 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 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: a [data-shredder] container holding .shredder__stage. Inside the stage, .shredder__window wraps exactly one .shredder__sheet (the document that gets shredded), and .shredder__machine is the slot housing. .shredder__light and .shredder__glow (the indicator) and .shredder__cue (a short "scroll" hint that fades as the feed starts) are optional. The script reads only these shredder__ classes and the data- attributes; the invoice__* classes in the demo are styling only.

What is only the demo's styling: the invoice layout, JetBrains Mono and Inter, the grey ground and the red accent on the struck-through price, the shredder head and its indicator light (green while feeding, amber on standby, set by --led-run and --led-idle; the script adds .is-feeding to .shredder__machine). Replace the sheet's contents with any HTML and restyle it freely; the strips are cut from whatever the sheet renders, so they always match. Keep the sheet a solid colour (paper), because the strips are copies of it and show its background.

Optional reveal hook: add a .shredder__after element inside the stage (after the window) and it fades in behind the falling strips once the sheet is wholly inside the slot. The housing then drops out of the stage and the element settles in the stage centre. Without it, the housing stays put and the pin is shorter, so there is no dead scroll. In reduced motion and without JavaScript it follows the document in normal flow.

CSS the effect depends on:

  • Everything pinned is gated on .has-js inside @media (prefers-reduced-motion: no-preference). Outside that gate, the stage is a normal block and the document sits in normal flow. Keep both halves of that split.
  • .shredder__stage is position: relative; height: 100svh; overflow: hidden.
  • .shredder__window ends at the slot line (height: var(--slot-y)) with overflow: hidden; that clip is what hides the part of the sheet already in the slot. The script sets --slot-y and --sheet-w on the stage.
  • .shredder__machine sits above the strips (z-index), so its height (--machine-h) is the hidden band between the intact sheet and the strips.
  • The sheet needs a fixed width that does not depend on its position (the demo uses min(600px, calc(100% - 48px))). The script positions it with inline left, top and transform, and removes them on teardown.
  • Generated strips use .shredder__strips, .shredder__strip, .shredder__hinge, .shredder__seg, .shredder__clone and .shredder__edge (the paper edge shading). Restyle .shredder__edge to change how a cut edge looks.

Options

Attribute Values Default Description
data-strips 2 to 60 28 Number of strips above 700px wide (about 21px each on a 600px sheet)
data-strips-mobile 2 to 60 14 Number of strips at 700px and below
data-distance 60 to 1000 200 (260 with .shredder__after) Pinned scroll length, as a percentage of the viewport height
data-sway 0 to 3 1 Sway and fan-out multiplier (halved on touch screens)
data-curl 0 to 3 1 Curl and twist multiplier for the lower part of each strip
data-slot auto, 0.2 to 0.85 auto Slot line as a fraction of the stage height. auto centres the sheet plus its fully hung strips in the stage

Each strip holds two clipped copies of the sheet (an upper and a lower hinged piece), so the copies number twice the strip count. Keep a long or complex document at a modest count.

Accessibility

  • Real text: the sheet stays one HTML document that screen readers read in full. The strips are copies marked aria-hidden with their focusable elements removed from the tab order.
  • Reduced motion: with prefers-reduced-motion: reduce there is no pin, no strips and no sway; the document shows intact in normal flow. Changing the preference while the page is open switches modes live.
  • No JavaScript: same as reduced motion.
  • Keyboard: if you add .shredder__after, focusing a link inside it scrolls straight to the point where it is fully revealed.
  • Contrast: document text meets 4.5:1 on the paper; the accent is used for a struck-through figure only.

How It Works

One pinned ScrollTrigger reports progress and a single GSAP ticker eases towards it. The intact sheet moves down inside a window that ends at the slot. Below the slot, each strip is two hinged pieces; each piece clips a copy of the sheet to that strip's column and moves it by the same amount as the original, so the text lines up across the cut. Feed speed becomes an energy value that drives every strip's spring targets with its own phase and frequency, so the strips sway, curl and twist independently, then settle when scrolling stops. After the feed, the strips drop with a stagger and the indicator light dims to idle.

Performance Notes

  • Every per-frame write is a transform (plus the light's opacity); clipping is plain overflow: hidden. While only the strips are swaying, the sheet copies are not rewritten at all.
  • One ticker serves all strips. It removes itself once the springs are at rest, and jumps to the resting state and sleeps whenever the section is offscreen.
  • Strips are rebuilt only when the stage or sheet size changes, or when you call refresh().
  • Never pair this with anticipatePin; with Lenis it makes the pin jump.

Dependencies

Required:

  • GSAP 3.12+ (the demo pins 3.15.0)
  • ScrollTrigger plugin

Optional:

  • Lenis 1.3+ for smooth scrolling (the demo pins 1.3.17). Add data-smooth="off" to <html> or ?smooth=off to the URL to run on native scroll. If the page already has a window.lenis, the effect uses that one and leaves it alone on teardown.

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

£7