Skip to content

No.533 · Text Animations

Extrude

Poster letters with real depth: every letter is a stack of thin slices darkening toward the back, so turning the word shows solid sides. It sways on its own, turns to face the pointer on a spring, and pops its letters forward one by one when clicked.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Tomato

Build a 3D extruded word ("MUSCAT", Hanken Grotesk 900, clamp(4rem, 17vw, 12.5rem), uppercase, tight tracking) inside a button. Geometry: each letter is an inline-block with transform-style: preserve-3d containing 28 absolutely positioned copies (slices) at translateZ(−t × 0.34em) for t = 0…1, coloured color-mix(in oklab, sideNear, sideFar t%), plus a front face at translateZ(0.5px) filled with a 170° gradient (highlight → face) via background-clip:text. The word sits in a sway wrapper (CSS: rotateY −16° ↔ 16°, rotateX 8° ↔ 2°, 7s alternate) and an inner turn wrapper whose rotation follows the pointer on a spring (k 120, ζ 0.62, up to ±30° Y and ±22° X) in a rAF loop that stops when settled; the sway pauses while the pointer is over it. perspective 900px on the button (the parent of the 3D tree). A blurred elliptical floor shadow slides opposite the turn. Click or Enter: each letter animates (WAAPI) translateZ(0.5em) translateY(−0.08em) and back with a small overshoot, 720ms, 70ms apart. A visually hidden h2 carries the word; the 3D spans are aria-hidden; the button is labelled. Reduced motion: a fixed three-quarter angle, no sway, spring or pop. Selected variant — Tomato (tomato): palette="tomato": face #ff5a36 with highlight #ff8a5c, sides #d93a1c → #6e1606, on a cream page (#f3ead8). This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Move the pointer to turn the word; click or press Enter to pop the letters. Motion: Pointer spring (k 120, ζ 0.62); 7s CSS sway; pop 720ms with 70ms stagger. Accessibility: A visually hidden heading carries the word and the 3D layers are aria-hidden; the pop is a real button with a label and a focus ring. Reduced motion holds a fixed angle. Responsive behavior: Font size is fluid (17vw), so the word always fits one line. Touch: Tap pops the letters; dragging turns it. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Move the pointer to turn the word; click or press Enter to pop the letters.
Motion
Pointer spring (k 120, ζ 0.62); 7s CSS sway; pop 720ms with 70ms stagger.
Accessibility
A visually hidden heading carries the word and the 3D layers are aria-hidden; the pop is a real button with a label and a focus ring. Reduced motion holds a fixed angle.
Responsive
Font size is fluid (17vw), so the word always fits one line.
On touch
Tap pops the letters; dragging turns it.