Back to library
INTERACTION_155

3D Wireframe.

A perspective wireframe plane recedes into the distance. The plane at its start offset before the trigger; translating the plane along the Z axis and looping seamlessly once in view, looping.

CATEGORY
Background
COMPLEXITY
Intermediate
TECH
CSS
PLATFORM
Both
PERFORMANCE
Medium
LIVE PLAYGROUND
CSS / CSS
/* 3D Wireframe — A perspective wireframe plane recedes into the distance. */
.wireframe-3d {
  --dur: 9s;
  --ease: linear;
  --stagger: 60ms;
  will-change: transform, opacity;
}

.wireframe-3d > * {
  opacity: 0;
  transform: translateY(14px);
  animation: wireframe-3d-in var(--dur) var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger));
}

/* the plane at its start offset -> translating the plane along the Z axis and looping seamlessly */
@keyframes wireframe-3d-in {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wireframe-3d > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
React / TSX
import { useEffect, useRef } from "react";

/** 3D Wireframe — trigger: in view, looping */
export function 3DWireframe({ children }: { children: React.ReactNode }) {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current;
    if (!el) return;
    if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
      el.dataset["state"] = "in";
      return;
    }
    const io = new IntersectionObserver(
      ([entry]) => {
        if (entry?.isIntersecting) {
          el.dataset["state"] = "in";
          io.unobserve(el);
        }
      },
      { threshold: 0.2 },
    );
    io.observe(el);
    return () => io.disconnect();
  }, []);

  return (
    <div ref={ref} className="wireframe-3d" data-state="out">
      {children}
    </div>
  );
}

IF YOU LIKE THIS, STEAL THESE TOO.

INTERACTION_152CSS

Grid Distortion

A technical grid bends gently around a moving focus point.

Background / MediumView
INTERACTION_014CSS + JS

Cursor Parallax

Layers drift at different depths as the pointer moves.

Mouse / LightView
LOVABLECURSORBOLTV0REPLITWINDSURFLOVABLECURSORBOLTV0REPLITWINDSURF
INTERACTION_022CSS

Logo Marquee

Infinite horizontal scroll with edge fades.

Background / LightView
STRUCTURE / 56PX
INTERACTION_023CSS

Tech Grid

Faint technical grid with a radial fade.

Background / LightView