forever components

Cards

Stacked Peeking Cards

Three layered gradient cards auto-cycle and fan out with a springy rotation on hover; cards spread left and right then restack when cursor leaves.

csslight complexitymoderate motionhover

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Card collection previews, playlist/deck UI, portfolio thumbnails where showing multiple items in compact space matters.

When not to

Contexts needing legible card content — the fanned back cards are partially obscured. Avoid when auto-cycle motion conflicts with focused reading layouts.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the fan rotation from 9deg to 14deg by editing the rotate(9deg) and rotate(-9deg) values in the hover/auto CSS rules, and slow the spring to 700ms by updating --dur-slow. 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

  • fan rotation angle (rotate(9deg) / rotate(-9deg))
  • spring duration (--dur-slow: 520ms)
  • idle demo cadence (DEMO_ON=1900 / DEMO_OFF=1600 / DEMO_FIRST=400 ms, resume IDLE_RESUME=3500 ms)
  • card gradient colors (--bg-surface, accent vars)
  • card dimensions (42vmin / 53vmin)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (transition-duration:.001ms)
  • visibilitychange stop/start
  • idle demo cycle (setInterval step() + hold()/release() takeover — the demo class shares every rule with :hover)
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Idle demo cycle runs by default (real input takes over, resumes after a few idle seconds) — remove the demo block for purely on-demand interaction
  • Card content labels are placeholder text only; real content must be wired in

cardsstackfanhoverspringgradientui-component

More Cards components

  • 3D Tilt ParallaxDark card tilts in 3D toward the cursor; badge, orb, and text layers float at distinct Z-depths. A radial shine tracks the pointer; auto-rotates when idle.
  • Frosted GlassA frosted glass card floats over three slowly drifting color blobs (gold, cream, tan); the panel lifts slightly on hover.
  • Spotlight HoverDark card with a peach radial glow and a CSS-masked grid that both track the cursor; auto-orbits when the pointer is away.
  • Gradient-Border GlowDark card framed by a spinning conic powder-blue, tan and slate gradient border with a soft blurred aura glow behind it; auto-rotates continuously.
  • Reveal on HoverDark gradient card that dims and zooms its background art on hover 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 when not hovered.