Cards
Elastic Sub-Grid Bento
A 2x2 telemetry bento whose grid tracks spring-expand toward the hovered or focused quadrant while the others compress.
csslight complexitymoderate motionpointeraccessible
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Metric dashboards, status pages and product overviews where four stats share one card and the hovered or focused one should grow to show detail.
When not to
Cards with long copy (detail text is single-line and clips in small cells). On touch, drag across the grid or tap a cell to expand it.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Edit the four .bnt-cell blocks (tag, .bnt-stat value, .bnt-detail line), the expansion weights in select() (1.75 versus 1) and the spring rate in tick() (.14), and the accent via --accent. Each cell is a button with aria-pressed; keep it in sync and 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.
- On touch, a tap selects a cell; collapse on pointer leave is not guaranteed.
- Cell detail text is single-line and clips in very small cells.
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…