Skip to content

No.536 · Text Animations

Loose Letters

A shop sign whose letter tiles hang from a rail on little strings. Brush past and they swing as damped pendulums, nudging their neighbours; a fast swipe spins one right round its pin. Click and they come off their hooks, fall, bounce and tumble — then climb back up and settle.

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: Paper

Build a hanging shop sign ("OPEN LATE") of letter tiles: each tile (0.86em × 1.06em, rounded, a subtle inset edge and two-step shadow, Newsreader 500) hangs 0.3em below a rail on a 1px string with a pin dot; transform-origin is the pin, so rotating a tile swings it on its string. Hanging physics (one rAF loop that sleeps when everything is still): each tile is a damped pendulum, ω' = −38·sin θ − 2.4·ω + 6·(neighbour angles − θ), integrated in two substeps; angles wrap past ±π so a hard push spins a tile all the way round. Pointer moves within an ellipse around a tile add its horizontal pointer speed (px/s ÷ 120) to ω, scaled by how low on the tile the pointer is (more lever) and by proximity. Click (or the Drop button): every tile leaves its hook with its current swing turned into velocity plus random scatter, falls under 2400px/s² gravity, bounces off the floor (restitution 0.32, friction 0.82), topples toward the nearest flat orientation, and is kept inside the walls; strings fade out. When everything is still for 1.3s (or on a second click), tiles climb back to their pins on staggered eased arcs (1.1s), unwinding whole turns the short way, then rehang with a small alternating swing. A Shake button gives keyboard users the push. Themes: paper (cream tiles, ink letters) and night (dark tiles, glowing amber). Reduced motion: a still sign with no controls. The h2 carries the text; tiles are aria-hidden. Selected variant — Paper (paper): Palette for this theme (Paper): --accent #c2361b; --ink #1f1b16; --muted rgb(31 27 22 / 0.55); --rail #3a3128; --shadow rgb(60 40 20 / 0.22); --string #6b5a44; --tile #fbf6ea; --tile-edge #e3d8c2. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "paper". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. 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: Brush across the letters to swing them; click to drop them; click again to hang them back up. Shake and Drop buttons do the same from the keyboard. Motion: Pendulum spring (ω² 38, damping 2.4, coupling 6); fall at 2400px/s², restitution 0.32; climb 1.1s staggered. Accessibility: The heading carries the words; the tiles are aria-hidden. Shake and Drop are real buttons. Reduced motion shows a still sign. Responsive behavior: Words wrap onto separate rows on narrow screens; pins are re-measured on resize. Touch: Dragging a finger across the letters swings them; tap drops them. 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
Brush across the letters to swing them; click to drop them; click again to hang them back up. Shake and Drop buttons do the same from the keyboard.
Motion
Pendulum spring (ω² 38, damping 2.4, coupling 6); fall at 2400px/s², restitution 0.32; climb 1.1s staggered.
Accessibility
The heading carries the words; the tiles are aria-hidden. Shake and Drop are real buttons. Reduced motion shows a still sign.
Responsive
Words wrap onto separate rows on narrow screens; pins are re-measured on resize.
On touch
Dragging a finger across the letters swings them; tap drops them.