Cards
Light Caustics Lens
Card that tilts toward the pointer while soft moss-green and neutral caustic light shifts behind it.
css+canvasmedium complexitymoderate motionpointeraccessible
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Hero or feature cards for optics, lighting or hardware products where a tilting lens and soft moving light add atmosphere without photography.
When not to
Dense information cards, or low-power contexts where a continuous canvas and 3D tilt are unwelcome.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Edit the card copy (.cpr-title, .cpr-sub, the IOR row) and the readout in tick() (Δλ), the tilt range (cx*14 degrees) and caustic discs (3 blobs of 18 rings in tick()), and the accent via --accent. Tilt follows the pointer or arrow keys; keep the demo-v1 lifecycle. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- Forever Opus tokens on :root (--bg, --surface*, --text*, --border*, --accent) — one moss accent, no gradients
- copy and data values in markup/script
Keep intact
- demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
- theme hook: ?theme= bootstrap, forever:theme message listener and :root[data-theme="light"] tokens
- IIFE wrapper, visibilitychange sleep, prefers-reduced-motion guard, time-based (dt) animation
Known limitations
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
- Touch has no hover tilt; the wall tile tilts from the demo or arrow keys.
More Cards components
- 3D Tilt ParallaxGraphite card tilts in 3D toward the cursor; a lacquer-red badge, a domed brass orb, a recessed track and text layers float at distinct Z-depths with…
- Frosted GlassA frosted glass card floats over three slowly drifting color blobs (gold, cream, tan); the panel lifts on hover or tap and can be dragged with a spring back.
- Gradient-Border GlowGraphite card framed by a rotating single-hue teal-glaze conic sweep clipped to a 2px ring over a faint base ring; no blurred aura. Contact plus ambient…
- Reveal on HoverDark gradient card that dims and zooms its background art on hover, drag up or tap while a hidden title-and-copy panel slides up from the bottom.
- Holographic IridescentA 3D-tilting card with a warm iridescent sheen and conic foil chip that shift with pointer position; drifts idly until first deliberate input.
- Stacked Peeking CardsThree layered card-stock faces (graphite, jade-deep, saffron-deep) auto-cycle and fan out with a springy rotation on hover; each casts contact plus…