This component no longer exists. It was in godui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-07 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Hero Parallax
godui/hero-parallaxRemovedComponent
A scroll-driven grid of cards that drift in alternating directions on a tilted perspective plane.
Install it
npx shadcn@latest add https://godui.design/r/hero-parallax.jsonSource
1"use client";23import {4 type MotionValue,5 motion,6 useReducedMotion,7 useScroll,8 useSpring,9 useTransform,10} from "framer-motion";11import * as React from "react";1213export type HeroParallaxItem = {14 title: string;15 thumbnail: string;16 href?: string;17};1819export type HeroParallaxProps = React.HTMLAttributes<HTMLDivElement> & {20 /** Cards to scatter across the parallax rows (best with ~15). */21 products: HeroParallaxItem[];22 /** Replaces the default headline block. */23 header?: React.ReactNode;24 /**25 * Scrollport for measuring progress. Defaults to the viewport — pass a26 * ref to an overflow container when embedding the hero in a framed demo.27 */28 scrollContainer?: React.RefObject<HTMLElement | null>;29};3031// SPRING.smooth — surfaces / shared-layout feel.32const SPRING = { stiffness: 320, damping: 32, mass: 0.9 } as const;3334function ProductCard({35 product,36 translate,37}: {38 product: HeroParallaxItem;39 translate: MotionValue<number>;40}) {41 const Wrapper = product.href ? motion.a : motion.div;42 return (43 <Wrapper44 style={{ x: translate }}45 whileHover={{ y: -20 }}46 transition={SPRING}47 href={product.href}48 className="group/card relative h-64 w-[26rem] shrink-0"49 >50 <img51 src={product.thumbnail}52 alt={product.title}53 draggable={false}54 className="absolute inset-0 size-full rounded-xl object-cover shadow-lg [outline:1px_solid_color-mix(in_oklch,var(--border)_60%,transparent)] [outline-offset:-1px]"55 />56 <div className="pointer-events-none absolute inset-0 rounded-xl bg-black/50 opacity-0 transition-opacity duration-300 group-hover/card:opacity-100" />57 <h3 className="absolute bottom-4 left-4 text-white opacity-0 transition-opacity duration-300 group-hover/card:opacity-100">58 {product.title}59 </h3>60 </Wrapper>61 );62}6364const HeroParallax = React.forwardRef<HTMLDivElement, HeroParallaxProps>(65 ({ products, header, className, scrollContainer, ...props }, ref) => {66 const reduce = useReducedMotion();67 const containerRef = React.useRef<HTMLDivElement>(null);68 React.useImperativeHandle(69 ref,70 () => containerRef.current as HTMLDivElement,71 );7273 const firstRow = products.slice(0, 5);74 const secondRow = products.slice(5, 10);75 const thirdRow = products.slice(10, 15);7677 const { scrollYProgress } = useScroll({78 target: containerRef,79 container: scrollContainer,80 offset: ["start start", "end start"],81// … truncated
What it pulls in
npm packages
Other registry items
