Skip to content

    Browse components

    Layer Stack

    Translucent design layers stacked in isometric view that fan apart on hover, with a layers panel to spotlight each one.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/layer-stack

    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/layer-stack.json

    Usage

    import { LayerStack } from "@/components/ui/layer-stack";
    
    <LayerStack
      layers={[
        { label: "Text", content: <h3>Hello</h3> },
        { label: "Image", content: <img src="/photo.jpg" alt="" /> },
        { label: "Background", content: <div className="size-full bg-gradient-to-br from-violet-500 to-cyan-400" /> },
      ]}
    />

    Props

    PropTypeDefaultDescription
    layersReactNode—Array of { label, content, icon? }. First item is the top layer.
    widthnumber260Layer width in px.
    heightnumber180Layer height in px.
    spreadnumber56Px between layers when fanned out.
    restGapnumber6Px between layers at rest.
    pitchnumber56Camera pitch in degrees.
    expandedbooleanfalseKeep the stack fanned out.
    showPanelbooleantrueShow the layers panel.
    classNamestring—Extra classes for the root element.