Skip to content

    Browse components

    Fog Deck

    A looping carousel where cards recede into 3D depth and blur the further they sit from center. Drag, click, arrows or keys.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/fog-deck

    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/fog-deck.json

    Usage

    import { FogDeck } from "@/components/ui/fog-deck";
    
    <FogDeck
      items={[
        { image: "/a.jpg", title: "Aurora", subtitle: "Iceland, 2024" },
        { image: "/b.jpg", title: "Meridian", subtitle: "Chile, 2023" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { image, title, subtitle? }.
    cardWidthnumber250Card width in px.
    cardHeightnumber330Card height in px.
    spacingnumber170Px between card centers.
    depthnumber180Z px pushed back per step.
    blurnumber3Blur px added per step.
    rotatenumber18Y rotation of side cards in degrees.
    visiblenumber2Cards shown per side.
    autoplaybooleantrueAdvance automatically (pauses on hover).
    autoplayDelaynumber3500Ms between steps.
    classNamestring—Extra classes for the root element.