Skip to content

    Browse components

    Panel Glide

    A row of image panels where the hovered or focused one glides open with its caption while the rest compress.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/panel-glide

    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/panel-glide.json

    Usage

    import { PanelGlide } from "@/components/ui/panel-glide";
    
    <PanelGlide
      items={[
        { src: "/alps.jpg", title: "Alps", subtitle: "Switzerland" },
        { src: "/fjord.jpg", title: "Fjords", subtitle: "Norway" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { src, title, subtitle? }.
    heightnumber380Row height in px.
    expandRationumber5How many times wider the open panel is.
    gapnumber10Px between panels.
    radiusnumber20Corner radius in px.
    durationnumber700Transition length in ms.
    defaultIndexnumber0Panel open at rest.
    classNamestring—Extra classes for the root element.