Skip to content

No.114 · Cards

Holo Foil Card

A founding-member card printed on holographic foil: tilt it and the rainbow slides across engraved foil lines, strongest at steep angles, glitter catches and goes, and a glare follows the light. Click to turn it over to a signature panel and a foil seal.

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

Build a holographic membership card (5:7, 300px, radius 20) inside a button that flips it. 3D: the card has transform-style preserve-3d and rotateX/rotateY from CSS variables; front and back faces are backface-hidden (the back pre-rotated 180°). A rAF spring (k 170, ζ 0.72) eases tilt toward the pointer (±15°) and a second spring (k 90, ζ 0.7) turns the card 0 ↔ 180° on click; the loop stops when settled. The pointer position (0–100%) also drives --px/--py (mirrored on the back), and --hyp (0–1, how steep the tilt is; a registered number). Front layers: the finish's base with a soft light at the pointer; foil — a repeating 115° rainbow gradient at 260% size whose position follows the pointer, colour-dodge blended, masked to fine 135° engraved lines and fading toward the edges, its opacity 0.18 + 0.62·hyp so it blooms at steep angles; glitter — three offset grids of tiny white points that shift at different rates (so they twinkle) masked to an ellipse around the light; content (italic serif logo, number, an emblem, "Founding member", the name in serif, "Since 2026 · Muscat"); the emblem is an SVG mask (a compass ring with two peaks) filled with its own faster rainbow, saturating with the tilt; a glare (radial white at the pointer, overlay); and an inner edge highlight. Back: a dark stripe, a signature panel, terms, and a conic foil seal. The button's label states the name, number and which side is showing (aria-pressed for flipped). A soft floor shadow shrinks while held. Reduced motion: no springs (direct, smaller tilt; the flip is instant). Selected variant — Rainbow (rainbow): finish="rainbow": a pale pearl base so the rainbow foil reads at full colour (the pearl uses multiply so the foil stays visible on a light card). 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 over the card to tilt it and move the light; click or press Enter/Space to turn it over. Motion: Tilt spring k 170 ζ 0.72; flip spring k 90 ζ 0.7; foil, glitter and glare follow the pointer through CSS variables. Accessibility: A real button with a full label and aria-pressed; the visual layers are aria-hidden. Reduced motion removes the springs. Responsive behavior: The card is min(300px, 78vw) wide and keeps its 5:7 proportion. Touch: Drag a finger across it to tilt; tap to flip. 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 over the card to tilt it and move the light; click or press Enter/Space to turn it over.
Motion
Tilt spring k 170 ζ 0.72; flip spring k 90 ζ 0.7; foil, glitter and glare follow the pointer through CSS variables.
Accessibility
A real button with a full label and aria-pressed; the visual layers are aria-hidden. Reduced motion removes the springs.
Responsive
The card is min(300px, 78vw) wide and keeps its 5:7 proportion.
On touch
Drag a finger across it to tilt; tap to flip.