Gallerykit
Justified

@gallerykit/justified

@gallerykit/justified registers a justified layout that packs images into rows of a target height while honouring each image's aspect ratio. Includes <Justified> and useGalleryJustified for custom render scenarios.

  • Stability: experimental
  • Peer dependencies: react, react-dom
  • Dependencies: @gallerykit/core

Install

pnpm add @gallerykit/justified

Quick example

import { Justified } from "@gallerykit/justified";

export default function Stream({ items }: { items: GalleryItem[] }) {
  return <Justified items={items} targetRowHeight={240} />;
}

See Getting Started for the full walkthrough and API for the public exports.