Skip to content

    Browse components

    Brick Gallery

    Animated masonry image grid: tiles fly in with a staggered blur-to-focus, glide to new slots on resize and zoom on hover.

    Open
    Customize
    bottom
    top
    left
    right
    center

    Installation

    npx shadcn@latest add @glint-ui/brick-gallery

    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/brick-gallery.json

    Usage

    import { BrickGallery } from "@/components/ui/brick-gallery";
    
    <BrickGallery items={[{ src: "/a.jpg", ratio: 1.4, alt: "Dunes" }, { src: "/b.jpg", ratio: 0.8 }]} />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { src, ratio (height / width), alt?, href? }.
    minColumnWidthnumber220Columns are as many as fit at this minimum width, in px.
    gapnumber16Px between tiles.
    staggernumber0.05Seconds between each tile's entrance.
    animateFrom"bottom" | "top" | "left" | "right" | "center""bottom"Where tiles fly in from.
    blurToFocusbooleantrueTiles start blurred and come into focus.
    hoverScalenumber1.08Image zoom on hover (1 disables).
    classNamestring—Extra classes for the root element.