# flickr/justified-layout

Pass in box sizes and get back sizes and coordinates for a justified layout

Repository: https://github.com/flickr/justified-layout
Canonical: https://ross.abutalabs.com/products/justified-layout
Homepage: https://flickr.github.io/justified-layout/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2023-09-05T21:20:40+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3865, "days_push": 1093, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1637, forks 86 (observed 2026-08-28T04:05:14.887372+00:00)

## What it is
A JavaScript library from Flickr that computes justified gallery layouts: given box sizes or aspect ratios, it returns positions and dimensions for each box. It powers Flickr-style photo grid layouts where rows are evenly justified to a container width.

## Use cases
- lay out a photo gallery with justified rows like Flickr
- compute coordinates for image grid from aspect ratios
- avoid widow rows in a justified image layout
- build a responsive masonry-style album page
- calculate container height for a justified grid

## When to choose
- you need Flickr-style justified photo layouts with simple geometry output
- you want a small, dependency-free layout calculator you can render yourself
- you need configurable padding, spacing, and target row height

## When to avoid
- you need a full gallery UI with lightbox and lazy loading built in
- you want CSS-only layout without JavaScript computation
- you need dynamic re-layout on scroll with virtualization included

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, graphics
- domain: web-development, frontend, photography
- platform: browser
- tags: justified-layout, photo-gallery, layout-algorithm, aspect-ratio, flickr, nodejs, javascript

## Member repositories
- flickr/justified-layout (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:14.887372+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:46:41.256827+00:00, confidence not recorded.
  - readme: https://github.com/flickr/justified-layout (fetched 2026-08-28T04:05:14.887372+00:00, sha a96532a25e3a)
  - homepage: https://flickr.github.io/justified-layout/ (fetched 2026-08-29T11:20:00.997487+00:00, sha 58a9e6992603)
  - registry_npm: https://registry.npmjs.org/justified-layout (fetched 2026-08-29T11:20:01.007125+00:00, sha 01920f9adcce)
- Data as of 2026-08-30T08:39:29.467469+00:00.
