forever components

CSS 3D & Perspective

Isometric Blocks

3x3 grid of soft lilac CSS 3D cubes bobs in a staggered sine wave on a dark lilac-tinted ground. Three shaded faces per cube simulate isometric lighting.

csslight complexitysubtle motion

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

Ambient hero backgrounds, game UI, or dashboards with a retro/isometric aesthetic.

When not to

Old WebViews or GPU-constrained devices where CSS 3D transforms are unreliable. Avoid over text-heavy layouts.

Working with an AI agent

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

Change grid to 4x4 by setting G=4, shift hue palette to amber (hues array near 35-45), slow the bob to t+=0.02. 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

  • grid size (G=3)
  • hue palette (hues array)
  • bob amplitude (3.2vmin)
  • animation speed (t+=0.04)
  • cube size (9vmin)
  • phase offset ((x+y)*0.7)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • transform-style:preserve-3d on #scene and .cube
  • visibilitychange pause/start
  • prefers-reduced-motion static fallback
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Changing cube size requires updating left/top offsets in the loop (hardcoded vmin math)
  • Background color hardcoded in CSS

isometric3dcss-3dcubessine-wavegridambient

More CSS 3D & Perspective components

  • Rotating CubeGlowing sage-green wireframe cube slowly auto-rotates in CSS 3D with a subtle sine-wave tilt; pointer movement offsets the rotation to follow the cursor.
  • Card Deck FanSeven gold-and-mauve playing cards fan open and closed in a sine-wave 3D arc using CSS rotateZ and perspective transform.
  • Coverflow RingEight vivid gradient cards orbit in a 3D coverflow ring with CSS perspective and per-card reflections. Pointer X position steers rotation speed.
  • Folding Paper4-panel paper accordion folds and unfolds in a zig-zag CSS 3D motion, slowly rotating on a dark green background. Cream front and sage back faces alternate.
  • Parallax DepthA glowing sun with colored orbiting dots on layered CSS 3D planes that tilt and parallax toward the pointer; auto-orbits until interaction.
  • Wireframe GlobeA teal wireframe globe of 6 longitude and 5 latitude rings rotates in CSS 3D perspective; pointer steers spin speed and tilt angle.