193

Slot Reel Headline

£7
or the whole Vault, £99
Open in new tab

A headline built from mechanical word reels. Pull the handle and each reel spins on a curved drum with motion blur, then the reels stop left to right, overshooting into their notches, to spell a new headline that always reads as a sentence. Flick any reel by hand to turn it on its own.

advanced
13 more details
text-animation3d-transformspointer-dragtouch-dragspring-physicsvelocity-reactivemomentumsnapinertiakeyboard-navigationreduced-motionprogressive-enhancementviewport-aware-ticker

Released

About this effect

A headline that behaves like a machine. Each word sits on its own drum behind a cream window, with the words printed round the cylinder so they foreshorten and darken toward the top and bottom of the window. Pull the handle and every drum kicks back, spins up into a motion blur and then stops in turn, left to right, running a little past its word and dropping back into the notch. The last reel can tease: it almost settles on one word, then creeps over onto the next.

Read the full effect overview

Every reel also turns by hand. Drag it and the drum follows the pointer exactly; flick it and it keeps the flick's speed, slows and clunks into the nearest notch with the same overshoot. A gentle drag nudges it a word or two, grabbing a reel mid-spin brakes it, and the arrow keys step a focused reel one word at a time.

The handle is a real control: a yellow ball on a chrome carriage that rides a slot built into the side of the cabinet. Drag it down the slot against its spring and how far and how fast you pull sets the spin: a light tug gives a short, slow spin, a full yank a long, fast one. Let go and it snaps back up into its stop with a short bounce. A click, a tap or the keyboard gives a full pull, and a second pull while the reels run brakes them early. Each reel holds one grammatical slot, such as verb, adjective and noun, so every combination reads as a headline, and a list of curated combinations can be favoured.

Slot Reel Headline - GSAP animation effect preview

What's included

12 items
  • Two to five word reels, each a curved drum with real foreshortening, depth and cylinder shading
  • A pull handle that slides down a chrome-bezelled slot in the cabinet against a spring; pull depth and speed set spin length and speed
  • Motion blur that scales with speed: stretched offset copies while a reel speeds up and slows down, a pre-blurred strip at full speed
  • Reels stop in sequence, each overshooting and settling into its notch; the last reel can tease past one word
  • Drag or flick any reel by hand: it follows the pointer 1:1, glides on with the release speed and settles into the nearest notch with the same clunk; grabbing a reel mid-spin brakes it
  • Grammatical slots per reel from a data attribute or child elements, plus optional curated combinations favoured on each spin
  • Click, tap, Enter or Space for a full pull; a second pull during a spin brakes the reels early; each reel is a focusable spin button stepped with the arrow keys
  • Optional auto-spin on an interval, paused offscreen
  • Stacked drums and a full-height handle slot on phones; touch drags on the handle and the reels never scroll the page, everywhere else scrolls normally
  • Headline exposed as one sentence to assistive technology and announced in a polite live region
  • Reduced motion crossfades each new word in place and settles hand-turned reels without overshoot; without JavaScript the first word of each reel is a static headline
  • spin(), stop(), step(), setWords(), setLever(), setAuto() and revert() per instance, plus reel:spinstart, reel:stop and reel:result events

Perfect for

4 use cases
  • A studio or agency homepage hero that shows the range of what it makes, one combination at a time
  • A product launch page where the headline itself is the first thing visitors play with
  • A campaign or event landing page with rotating taglines that need a memorable mechanic
  • A portfolio intro or about page that turns a list of skills into a sentence

How it works

4 sections

Each reel is a strip of words laid round a cylinder. The script keeps one number per reel, the drum position in words, and every frame it places each word at its angle on the drum: it moves by the drum radius times the sine of that angle, squashes by the cosine and shrinks slightly with depth, using only transforms and opacity. A static gradient over each window darkens the curve, and a highlight sits on the glass in front.

A spin is a GSAP timeline per reel: a small kick back, a power ease up to speed, a steady cruise and a power ease down. The cruise speed is adjusted so each reel lands exactly on its chosen word at its scheduled stop, then a back ease drops it into the notch. Blur comes from the measured speed: offset copies stretch and fade in as the reel accelerates, and at full speed a copy of the list blurred once by a vertical SVG filter takes over, moved by transform alone. The ticker runs only while a reel moves.

The handle rides a vertical slot in a column of the housing. Its position is one pull depth from 0 at the top to 1 at the bottom, drawn with translateY alone, and the travel adapts to the track so the slot can be any size. Pointer events drive it directly, with the pull depth and peak speed turned into the spin strength when it is released; a spring then snaps it back up into its top stop with two small bounces. A drag that ends where the page cannot hear it, released outside an iframe or after the window loses focus, still lets go.

A reel turned by hand uses the same drum position. While it is held, the position follows the pointer one word height per word, and the last tenth of a second of movement gives the release speed. The reel then glides on a power ease whose starting speed matches the flick, to a point just past the word that speed would reach, and drops back into the notch on the same back ease as a spin, so the clunk is identical. A slow release goes straight to the nearest word. Arrow keys run the same settle one word at a time, and the headline is announced once every reel is at rest.

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 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 the machine anywhere in your <body>:

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

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

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

The script finds every [data-slot-reel] machine, builds a drum for each [data-reel], and wires the lever, the optional auto-spin toggle and the live region. Several machines can share a page; each is independent.

Using It With Your Own Design

What the effect needs from your markup:

  • [data-slot-reel] on the machine. Options go on this element.
  • [data-slot-headline] around the reels. It should be your real heading element: the script adds a visually hidden copy of the current sentence inside it and points the heading's aria-labelledby at it, so the heading is named as one sentence while each reel window becomes a focusable spin button.
  • One [data-reel] per word slot, two to five of them. The words come from data-words (comma separated) or, if that is missing, from child elements marked [data-word].
  • Inside each reel, a [data-reel-window] (the clipping window the drum is built in, and the surface you drag or focus to turn the reel) holding a [data-reel-static] word. That static word is the headline before the script runs and without JavaScript; give it the first word of the list.
  • [data-slot-lever] is optional but should be a native <button>. If it contains a [data-lever-track] and a [data-lever-handle], the handle slides down the track as the lever; without them the button still spins the reels on click.
  • [data-slot-auto] (a toggle button) and [data-slot-live] (a polite live region) are optional.

What is only the demo's styling: the graphite housing, the cream drum colours, the glass highlight, the yellow payline markers, the handle column, the slot's chrome bezel, the carriage and the ball knob, the fonts and the control row layout. Recolour or replace any of it. Instrument Serif is used because a narrow, high-contrast serif keeps each word large inside a fixed window; any face works, and the script measures your words to size the windows.

CSS the effect depends on:

  • .slot-reel__window must be position: relative; overflow: hidden with a fixed height. The demo sets the height to 1.8 times --line (one word height); taller windows show more of the neighbouring words.
  • --line on the headline is the height of one word on the drum. --reel-pad (unitless, in em) is the side padding of each window, and the script reads it when it sizes the windows.
  • The script writes --reel-w on each reel (the window width, from the widest word) and --reel-fit on the headline (a scale under 1 when the reels would not fit the row). Keep width: var(--reel-w) on the window and font-size: calc(var(--reel-font) * var(--reel-fit, 1)) on the headline.
  • .slot-face (generated) is absolutely positioned and centred on the window's middle line; the script owns its transform and opacity. .slot-reel__drum and .slot-reel__blur carry will-change; keep it on those few elements only.
  • .is-live .slot-reel__static { visibility: hidden; } hides the static word once the drum exists. Do not hide it with display: none: it also gives the window its width before the script runs.
  • The handle slides straight down its track with translateY only. Its resting centre is wherever CSS places it near the top of [data-lever-track] (the demo uses top: calc(var(--track-inset) + var(--slot) * 0.5)), and the script measures the travel as the track height minus that inset at both ends, so the track and handle can be any size. A drag down the track sets the pull depth, 0 at the top to 1 at the bottom; on release a spring snaps it back up into the top stop with two small bounces. The demo builds the handle column onto the housing (--lever-w, --knob, --slot, --track-inset) and squares the housing's corners where they meet. Keep touch-action: none on the lever and on .is-live .slot-reel__window, and nowhere else, so dragging either never scrolls the page while the rest of it scrolls normally.
  • The narrow-screen layout is CSS only: under 640px the headline becomes a column, each window goes full width and the script detects the column and fits the type to the window instead of the row.

Options

Attribute Values Default Description
data-words (on [data-reel]) Comma-separated words child [data-word] text The words on this reel, in drum order
data-spin-min Seconds 1.3 Time to the first stop for the lightest pull
data-spin-max Seconds 3.2 Time to the first stop for a full yank
data-stagger Seconds 0.42 Gap between one reel stopping and the next
data-overshoot 0 to 0.9 (words) 0.3 How far a reel runs past its word before settling back
data-radius 0.8 to 4 (word heights) 1.25 Drum radius. Smaller is a tighter, more curved drum; larger is flatter
data-tease true, false true On strong pulls the last reel almost settles one word early, then creeps on
data-throw Seconds 0.4 How far a flicked reel glides: release speed (words per second) times this. 0 drops straight into the nearest notch
data-reel-label (on [data-reel]) Text Word 1 of 3 Accessible name of that reel's spin button
data-curated `Word word word; ...`
data-favour-curated true, false true When on, about 70% of spins land on a curated combination
data-auto true, false false Start with auto-spin on
data-auto-interval Seconds 5 Time between the end of one auto spin and the next pull

Spin speed ranges from 11 to 30 words per second with pull strength; the limits are speedMin and speedMax in the script's CONFIG block.

How It Works

Each reel keeps one number, its drum position in words, and every frame places each word at its angle on a cylinder using transforms and opacity only. The handle and the reels both drive that number. A pull plans a timeline per reel that lands on its chosen word at its scheduled stop. A hand drag sets the position directly, one word height of pointer travel per word, then on release glides on with the measured speed and drops back into the nearest notch on the same back ease a spin uses, so every stop has the same clunk. Blur is derived from the measured speed, whichever moved the reel.

Accessibility

  • Keyboard: each reel window is in the tab order as a spin button. ArrowUp brings the next word up onto the payline and ArrowDown the previous one, each with the same overshoot and clunk as a spin; held keys queue whole words. The handle is a native button after the reels: Enter or Space gives a full pull, and pressing again while the reels run brakes them. Reels and knob show a focus ring.
  • Pointer: drag a reel vertically and it turns 1:1 with the pointer; let go and it keeps the flick's speed, decelerates and settles into the nearest notch. A gentle drag moves it a word or two. Grabbing a reel during a spin brakes that reel; the spin finishes when you let go.
  • Screen readers: the heading is named by one visually hidden sentence ("Build honest tools") through aria-labelledby; each reel is a spin button whose value is its current word. After a spin, or once a reel turned by hand has settled, the new headline is announced once in the polite live region. Moving words are never announced.
  • Touch: drag the handle down its slot, or drag a reel. touch-action: none applies to the handle column and the reel windows only, so the rest of the page scrolls normally. A tap on the handle is a full pull. A drag that ends where the page cannot hear it (released outside an iframe, or the window losing focus) still springs the handle back.
  • Reduced motion: there is no spin, blur or handle movement. A pull crossfades each new word in place, left to right. Reels still turn by hand; on release they land on the nearest word without overshoot. Switching the preference while the page is open rebuilds the machine and keeps the current words.
  • No JavaScript: the first word of each reel is shown as a static headline; the handle, the toggle and the cue are hidden or blank.
  • Auto-spin is off by default, can be stopped with its toggle, and pauses while the machine is offscreen.

Dependencies

Required:

  • GSAP 3.12+ (core only; the demo pins 3.15.0)

Optional:

  • None. No plugins, no Lenis.

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

£7