# Justified

> Flickr-style justified row layout that preserves the original aspect ratio of every image.

Source: https://gallerykit.n.yatsyk.com/docs/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

```bash
pnpm add @gallerykit/justified
```

## Quick example

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

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

See [Getting Started](./getting-started.mdx) for the full walkthrough and [API](./api.mdx) for the public exports.
