Most scroll animations on the web are fade-ins, parallax layers and horizontal galleries. They work, but a visitor has seen them hundreds of times. This batch tries something different: each of the six snippets below is built around a physical object with a mechanism you can see. There is a zipper, a receipt printer, a safe dial, a lamp cord, a pair of eyes and a tape measure.

All six are free and self-contained, and they are spread across the Scroll Effects, Buttons and Animations categories. Each one is a live, interactive preview you can try right in this article, written in plain HTML, CSS and JavaScript (with GSAP where it helps). Each exports to React, Vue, Angular or Tailwind in one click from its snippet page, and none of them repeats an effect that is already in the collection.

A tip for the previews: the scroll-driven ones pin themselves inside their frame, so scroll with your mouse wheel or finger while the pointer is over the preview. If the page scrolls instead, move the pointer into the frame and try again.

What these six have in common

  • A believable effect copies the real object. A receipt advances in steps, a safe dial turns in alternating directions, and a pull cord stretches and then rebounds. The CSS is secondary to the behaviour you are imitating.
  • One value drives the whole thing. The zipper uses a single progress number, the safe uses one timeline and the tape measure uses one ScrollTrigger. That is what makes scrolling backward work for free.
  • Only transforms, clip-paths and opacity move. Nothing here animates width, height or top, so the effects stay smooth on a mid-range phone.
  • Real content stays real. The receipt, the vault contents and the article are ordinary HTML, the toggle is a true switch, the progress bar has ARIA values, and every effect has a prefers-reduced-motion path.

1. Scroll Zipper Reveal

A dark fabric cover with a gold zipper pull. As you scroll, the pull slides down the page, the cloth peels back in a widening V and the section underneath shows through. Open Scroll Zipper Reveal and copy the code.

How it works. A single object, { p: 0 }, is tweened from 0 to 1 by a pinned ScrollTrigger. One draw(p) function turns that number into everything you see: two mirrored clip-path polygons for the cloth, three dashed SVG lines for the teeth, and the pull’s position. Because nothing else is animated, scrolling back up closes the zip exactly as it opened. Once the pull reaches the bottom edge it keeps travelling below the screen while the opening widens with it, so the teeth stay attached to the fabric edge until none is left in the way.

Worth stealing: Drive a complicated effect from one progress number. Reversing, scrubbing and reduced-motion fallbacks all become trivial.

2. Scroll Receipt Printer

A thermal printer at the bottom of the screen feeds an itemized receipt upward as you scroll: shop name, six line items, tax, a total, a barcode and a red PAID stamp that lands last. Open Scroll Receipt Printer and copy the code.

How it works. The receipt is one block that moves from yPercent: 100 to 0 inside a window with overflow: hidden. The printer body sits above it with a higher z-index, so the paper really seems to leave the slot. The detail that sells it is the easing: steps(28) makes the paper advance in small mechanical jerks instead of gliding. The torn top edge is a CSS mask and the barcode is a repeating gradient, so there are no image files.

Worth stealing: A stepped ease turns a generic slide into a machine. If the real object moves in increments, make the animation do the same.

3. Scroll Safe Dial Unlock

A steel vault fills the stage. Scrolling turns the combination dial clockwise to 24, back to 07 and forward to 61, lights three LEDs, retracts the bolts and swings the door open on a 3D hinge. Open Scroll Safe Dial Unlock and copy the code.

How it works. Everything lives on one GSAP timeline mapped to a pinned ScrollTrigger: the first 30% is the three dial turns, then the bolts, then the door, then the contents. The dial is a single rotation value, and a small function converts the angle into one of 100 numbers (3.6 degrees each) for the readout, so the number on the display always matches the marks. The door uses perspective on the parent and transform-origin: left center with rotationY for the hinge.

Worth stealing: Make the visitor earn the reveal. A short sequence with feedback at every stage (an LED, a number) feels like progress, where a plain fade just feels like a page loading.

4. Pull Cord Dark Mode Toggle

A hanging lamp with a brass bead on a cord. Drag the bead down, the cord stretches, and past a threshold the lamp switches on and the whole page changes theme. On release the bead springs back. Open Pull Cord Dark Mode Toggle and copy the code.

How it works. GSAP Draggable limits the bead to the Y axis. On each drag update the cord, a thin element with transform-origin: top, is scaled so it always reaches the bead. In onRelease, a pull of at least 44px toggles data-theme on the scene, and a tween returns the bead with elastic.out(1, 0.3). All colours are CSS variables redefined for the light theme, so the page, card, bulb and glow change together. The bead is a real <button role="switch"> with aria-checked, and Enter or Space gives the cord a tug and toggles.

Worth stealing: A playful control still needs a keyboard path and a proper role. Here the fun layer and the accessible layer are the same element.

5. Cursor-Tracking Eyes Mascot

A purple mascot whose pupils follow your mouse or finger. It blinks at random, glances down when you scroll, wanders when you stop moving, and raises its brows when you go near the button. Open Cursor-Tracking Eyes Mascot and copy the code.

How it works. No library is needed. Every animation frame, each eye measures its own centre with getBoundingClientRect(), works out the direction to the pointer and moves its pupil by Math.min(max, distance * 0.3), where max keeps the pupil inside the white. Easing the position toward the target with a factor of 0.2 gives the eyes natural inertia. Blinking, the scroll glance and idle wandering are small timers layered on top, and hover or focus on the button toggles an excited class.

Worth stealing: Compute each eye’s direction separately. When the cursor is close, the pupils converge slightly, which is the difference between a living face and two dots moving together.

6. Scroll Tape Measure Progress

A yellow tape measure fixed to the top of the page. The blade pulls out of its case as you read, a metal hook rides at the tip, and a live counter shows centimetres from 0 to 100, one for each percent of the page. Open Scroll Tape Measure Progress and copy the code.

How it works. The tape is always full width inside a mask, and GSAP animates clipPath from inset(0 100% 0 0) to inset(0 0% 0 0). Revealing instead of stretching keeps the tick marks from squashing, and clip-path repaints without layout. The graduations are two stacked linear-gradient layers, minor ticks every 1% and major ticks every 10%. A ScrollTrigger with no trigger element, start: 0 and end: 'max' measures the whole document, and the track is a role="progressbar" with a live aria-valuenow.

Worth stealing: A progress bar can carry your brand. A tape measure suits a how-to guide, a furniture shop or a craft blog far better than a generic line.

Which one should you use?

A word of restraint: one signature interaction per page is plenty. These work because they are surprising, and putting a zipper, a safe and a mascot on the same page makes each of them weaker. Pick the one that fits your subject and let the rest of the page stay quiet.

Frequently asked questions

Do these need a JavaScript library? Five of the six use GSAP, loaded from a CDN: the zipper, receipt, safe and tape measure use ScrollTrigger, and the pull cord uses Draggable. The eyes mascot is plain JavaScript. Every snippet lists its CDN links in the editor, so you can copy them with the code.

Will the scroll effects work on phones? Yes. Pinned scrubbing follows the browser’s own scroll position, so touch scrolling works the same as a mouse wheel. The layouts adapt to narrow screens, and the pull cord and the mascot respond to touch through pointer events.

Are they accessible? Each one keeps its content as real HTML and respects prefers-reduced-motion. The scroll effects skip the pin and show their finished state, the pull cord drops its spring, and the mascot stops blinking and wandering. The theme switch has role="switch" and works with Enter and Space, and the tape measure is a labelled progress bar.

Can I use them on a client or commercial project? Yes. The code is free to copy and adapt. Open a snippet, change the colours, text and timing in the live editor, then copy the code or export it for your framework.

Find all six, plus the rest of the scroll and cursor effects, in the Scroll Effects category. Open any snippet above and you land straight in the live editor with its HTML, CSS and JS tabs. Click Save as to copy it into My Code and start changing it.


Discover more from WebDevPuneet

Subscribe to get the latest posts sent to your email.