Folding Text

A headline that arrives by turning, each word swinging down around its top edge like a card.

Build a headline that arrives by folding into place. Structure: a flex row of word spans inside a container that carries perspective: 700px. Put the perspective on the PARENT, never on each word. Per-word perspective gives every word its own vanishing point and the line stops sitting on one plane. The motion per word: rotateX from -92deg to 0, opacity 0 to 1, 600ms, ease [0.2, 0.9, 0.3, 1], staggered 130ms apart in reading order. Four details carry it: 1. transformOrigin: top center. This is the hinge. Rotate around the middle instead and the word flips through itself, which reads as a glitch, not a fold. 2. Start at -92deg, not -90. At exactly 90 the word is edge-on and mathematically invisible, and a surviving hairline can flicker on the first frame. 3. backface-visibility: hidden, so the reverse of the word never shows through mid-turn. 4. 130ms of stagger. Close enough to read as one headline arriving, far enough apart that each individual hinge is legible. Fold them all at once and you get a single card turning, which is a different and duller effect. Give the last word your accent color. It gives the fold a destination, so the sequence ends rather than merely stopping. Make the whole line a replayable button (data-demo-trigger) and re-key the words on each run so the animation restarts cleanly. Put the full headline in the button's aria-label. Under prefers-reduced-motion, render the headline flat, opaque, and unstaggered. Colors as tokens: primary ink for the words, one accent token for the final word. Nothing else. Build the component, not this demo of it. - Ambient motion that IS the component may loop: a drifting background, a marquee, a spinner while something is genuinely loading. - Do not add any timer, interval, loop or script that performs a person's action by itself. No auto-hover, no auto-click, no cycling through states, no pretend submitting, no replaying the interaction on a schedule. - Every state that answers a person waits for a real event from that person. - Placeholder copy and sample content are welcome. Simulated behaviour is not.

Rate it
0
0

We'd like to measure how the site gets used, with Google Analytics. It sets cookies. Everything the site needs to work runs either way. How we handle data