Skip to content

    Browse components

    Parallax Cards

    A draggable, snapping row of photo cards whose images drift inside their frames as the row scrolls and tilt toward the pointer.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/parallax-cards

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/parallax-cards.json

    Usage

    import { ParallaxCards } from "@/components/ui/parallax-cards";
    
    <ParallaxCards
      items={[
        { image: "/kyoto.jpg", title: "Kyoto", subtitle: "Japan", tag: "Culture" },
        { image: "/lofoten.jpg", title: "Lofoten", subtitle: "Norway", tag: "Nature" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { image, title, subtitle?, tag? }.
    cardWidthnumber280Card width in px.
    cardHeightnumber380Card height in px.
    gapnumber20Px between cards.
    intensitynumber0.2How far photos drift while scrolling, as a fraction of card width.
    tiltnumber6Max pointer tilt in degrees.
    fadeEdgesbooleantrueFade the row out at both edges.
    classNamestring—Extra classes for the root element.