forever components

CSS 3D & Perspective

Origami Crane Unfold

Paper origami crane folds and unfolds in CSS 3D via hinge transforms; rises and rotates with a breathing rhythm, yaw tracks cursor.

cssheavy complexitymoderate motionpointer

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

Creative hero sections, loading screens, or ambient displays where a calm 3D papercraft object adds visual depth without distraction.

When not to

Contexts requiring legible content overlays or low-end devices — per-frame DOM style writes across many hinge elements may cause jank.

Working with an AI agent

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

Change the base unit to U=160 for a larger crane, swap paper colors P1/P2/P3 to cool blues, and slow the breath by changing phase+=0.0075 to phase+=0.004. 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

  • base unit size (U=120)
  • paper colors (P1, P2, P3)
  • breath speed (phase += 0.0075)
  • yaw pointer influence range (±40 degrees)
  • wing fold angle (a1: -58/58)
  • accent/beak color (ACC='#c1432a')
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • IIFE wrapper
  • prefers-reduced-motion guard (static apply(1) branch)
  • visibilitychange stop/start
  • smoothstep fold formula (s*s*(3-2*s))
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Per-frame inline style writes on every hinge and face element may cause layout thrash on older browsers
  • No aria semantics — add aria-hidden in production
  • Pointer yaw only tracks X axis; no vertical tilt tracking

origami3dcss-3dfoldcraneperspectivegenerative

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.
  • Isometric Blocks3x3 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.
  • Parallax DepthA glowing sun with colored orbiting dots on layered CSS 3D planes that tilt and parallax toward the pointer; auto-orbits until interaction.