{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cube-3d",
  "title": "3D Cube",
  "author": "VenusUI",
  "description": "A CSS-only cube with six content faces that tumbles slowly and pauses on hover.",
  "files": [
    {
      "path": "registry/default/ui/cube-3d.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst FACES = [\n  \"rotateY(0deg)\",\n  \"rotateY(90deg)\",\n  \"rotateY(180deg)\",\n  \"rotateY(-90deg)\",\n  \"rotateX(90deg)\",\n  \"rotateX(-90deg)\",\n] as const\n\ninterface Cube3dProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n  /** Up to six faces: front, right, back, left, top, bottom. Missing faces stay empty. */\n  faces: React.ReactNode[]\n  /** Edge length in pixels. */\n  size?: number\n  /** Seconds per full turn. */\n  duration?: number\n}\n\n/**\n * A CSS-only cube that slowly tumbles in 3D and pauses on hover. Faces take\n * any content. With reduced motion it rests at a fixed angle that shows\n * three faces. Works in Server Components.\n */\nfunction Cube3d({ faces, size = 160, duration = 14, className, style, ...props }: Cube3dProps) {\n  return (\n    <div\n      data-slot=\"cube-3d\"\n      className={cn(\"group relative [perspective:900px]\", className)}\n      style={{ width: size, height: size, ...style }}\n      {...props}\n    >\n      <div\n        className=\"relative size-full animate-cube-3d [transform-style:preserve-3d] group-hover:[animation-play-state:paused] motion-reduce:animate-none motion-reduce:[transform:rotateX(-24deg)_rotateY(-36deg)]\"\n        style={{ animationDuration: `${duration}s` }}\n      >\n        {FACES.map((transform, index) => (\n          <div\n            key={transform}\n            className=\"absolute inset-0 flex items-center justify-center rounded-lg border bg-card/90 p-3 text-center text-sm font-medium [backface-visibility:hidden]\"\n            style={{ transform: `${transform} translateZ(${size / 2}px)` }}\n          >\n            {faces[index]}\n          </div>\n        ))}\n      </div>\n    </div>\n  )\n}\n\nexport { Cube3d, type Cube3dProps }\n",
      "type": "registry:ui"
    }
  ],
  "cssVars": {
    "theme": {
      "animate-cube-3d": "cube-3d 14s linear infinite"
    }
  },
  "css": {
    "@keyframes cube-3d": {
      "from": {
        "transform": "rotateX(-20deg) rotateY(0deg)"
      },
      "to": {
        "transform": "rotateX(340deg) rotateY(360deg)"
      }
    }
  },
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "3d",
    "animations"
  ],
  "type": "registry:ui"
}