{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "parallax",
  "title": "Parallax",
  "description": "Drifts content at a different speed from the page as it scrolls past, with CSS scroll-driven animations and no JavaScript.",
  "dependencies": [
    "@radix-ui/react-slot"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/parallax.tsx",
      "content": "import { Slot } from \"@radix-ui/react-slot\";\nimport type { ComponentProps, CSSProperties } from \"react\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\ninterface ParallaxProps extends ComponentProps<\"div\"> {\n  /** Move the single child element instead of wrapping it in a div. */\n  asChild?: boolean;\n  /**\n   * How far, in px, the element drifts each way while it crosses the\n   * viewport. Positive values lag behind the scroll, negative values run ahead.\n   */\n  offset?: number;\n}\n\n/**\n * Drifts content at a different speed from the page while it scrolls past.\n * It runs on CSS scroll-driven animations, so there is no JavaScript and no\n * scroll listener; browsers without them, and `prefers-reduced-motion`, keep\n * the content still. Works in server components.\n *\n * It follows the nearest scroll container, and `overflow: hidden` makes one\n * that never scrolls, so the content stays put. Clip a wrapper with\n * `overflow: clip` (`overflow-clip`) instead.\n */\nfunction Parallax({ asChild = false, offset = 40, className, style, ...props }: ParallaxProps) {\n  const Comp = asChild ? Slot : \"div\";\n  return (\n    <Comp\n      data-slot=\"parallax\"\n      className={cn(\n        \"supports-[animation-timeline:view()]:animate-parallax motion-reduce:!animate-none\",\n        className\n      )}\n      style={\n        {\n          \"--parallax-offset\": `${offset}px`,\n          animationTimeline: \"view()\",\n          animationRange: \"cover 0% cover 100%\",\n          ...style,\n        } as CSSProperties\n      }\n      {...props}\n    />\n  );\n}\n\nexport { Parallax, type ParallaxProps };\n",
      "type": "registry:ui"
    }
  ],
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "keyframes": {
            "parallax": {
              "from": {
                "transform": "translate3d(0, var(--parallax-offset, 0px), 0)"
              },
              "to": {
                "transform": "translate3d(0, calc(var(--parallax-offset, 0px) * -1), 0)"
              }
            }
          },
          "animation": {
            "parallax": "parallax linear both"
          }
        }
      }
    }
  },
  "cssVars": {
    "theme": {
      "animate-parallax": "parallax linear both"
    }
  },
  "css": {
    "@keyframes parallax": {
      "from": {
        "transform": "translate3d(0, var(--parallax-offset, 0px), 0)"
      },
      "to": {
        "transform": "translate3d(0, calc(var(--parallax-offset, 0px) * -1), 0)"
      }
    }
  },
  "categories": [
    "motion"
  ],
  "type": "registry:ui"
}