Skip to content
3D & Experimental

CubeMorph

One solid melts from cube to sphere to diamond to ring as it turns. A click, Enter or Space moves on at once. Clear background, so it sits on anything. WebGL, no three.js.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
shapes("cube" | "sphere" | "diamond" | "ring")[]all fourShapes in order. It loops back to the first.
holdnumber2Seconds it rests on each shape.
colors[string, string]["#7c3aed", "#22d3ee"]Six-digit hex.
speednumber11 is the default turning pace; 2 is twice as fast.
labelstring"Change the shape"What the button says to screen readers.
classNamestring"aspect-square w-72"Set the size here.