{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "scroll-device",
  "title": "Scroll Device",
  "author": "VenusUI",
  "description": "A large screen, tipped back in 3D, that swings upright as it scrolls into view.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/default/ui/scroll-device.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { motion, useReducedMotion, useScroll, useSpring, useTransform } from \"motion/react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface ScrollDeviceProps {\n  /** What runs on the screen: a screenshot, a video or live UI. */\n  children: React.ReactNode\n  /** Starting tilt in degrees. */\n  tilt?: number\n  className?: string\n}\n\n/**\n * A large screen, tipped back in 3D, that swings upright as it scrolls into\n * view. Put anything on the screen. It stays flat and still with reduced\n * motion.\n */\nfunction ScrollDevice({ children, tilt = 38, className }: ScrollDeviceProps) {\n  const ref = React.useRef<HTMLDivElement>(null)\n  const reduceMotion = useReducedMotion()\n  const { scrollYProgress } = useScroll({ target: ref, offset: [\"start end\", \"center center\"] })\n  const progress = useSpring(scrollYProgress, { stiffness: 120, damping: 28, mass: 0.4 })\n  const rotateX = useTransform(progress, [0, 1], [tilt, 0])\n  const scale = useTransform(progress, [0, 1], [0.86, 1])\n  const y = useTransform(progress, [0, 1], [80, 0])\n\n  return (\n    <div ref={ref} data-slot=\"scroll-device\" className={cn(\"perspective-[1200px]\", className)}>\n      <motion.div style={reduceMotion ? undefined : { rotateX, scale, y }} className=\"origin-bottom transform-3d\">\n        <div className=\"rounded-[1.6rem] border border-foreground/10 bg-neutral-900 p-2 shadow-[0_40px_120px_-30px_rgb(0_0_0/0.6)] sm:p-3\">\n          <div className=\"relative aspect-16/10 overflow-hidden rounded-[1.1rem] bg-background\">{children}</div>\n        </div>\n      </motion.div>\n    </div>\n  )\n}\n\nexport { ScrollDevice, type ScrollDeviceProps }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "3d",
    "animations",
    "cards"
  ],
  "type": "registry:ui"
}