Skip to content

No.21 · Buttons

Letterpress

A cotton-paper plate where each letter bites deeper as the cursor passes — a travelling dent — and a press stamps the line.

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

Design a button that feels printed on heavy cotton paper. On the paper tone the plate is a warm off-white (#ece4d6) with faint paper fibres (a tiny feTurbulence noise data-URI at 9% alpha), a soft highlight from the top-left, an inset light lip along its top edge and a small grounded shadow. The label is set in a serif in all small caps with generous tracking (0.16em), in deep plum ink. Split the label into individual letters (sorts). On pointer move, compute each letter's horizontal distance to the cursor and give it a smoothstepped bite depth (0–1 within ~46px). Depth pushes the letter down 1.6px, squeezes it 3%, deepens the ink, and swaps its shadow for a letterpress bite — a dark edge above and a paper lip catching light below — so a dent travels through the word as the cursor moves. Transitions are short (140ms) so the dent flows rather than jumps; updates are batched into one rAF. Pressing stamps the whole line: every letter bites fully in a 420ms press-and-release, staggered 12ms per letter like a platen rolling across, while the plate compresses to 98.5% with an inner shadow. Keyboard focus shows a light, even impression. The button's accessible name is the plain string. Selected variant — Paper (paper): tone="paper": warm off-white plate with deep plum ink letters, on a #1a1319 page. 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: Cursor proximity presses nearby letters into the paper; press/Enter stamps the whole word. Motion: Per-letter depth transitions 140ms; stamp 420ms with 12ms stagger; plate compress 180ms. Accessibility: A real <button> with aria-label set to the full text; the split letters are aria-hidden so screen readers hear one word, not letters. Reduced motion removes the stamp and transitions. Responsive behavior: Intrinsic width; works with any short label. Touch: The travelling dent needs a mouse; taps still stamp the word. 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
Cursor proximity presses nearby letters into the paper; press/Enter stamps the whole word.
Motion
Per-letter depth transitions 140ms; stamp 420ms with 12ms stagger; plate compress 180ms.
Accessibility
A real <button> with aria-label set to the full text; the split letters are aria-hidden so screen readers hear one word, not letters. Reduced motion removes the stamp and transitions.
Responsive
Intrinsic width; works with any short label.
On touch
The travelling dent needs a mouse; taps still stamp the word.