Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions content/docs/components/gallery.mdx
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
---
title: Gallery
description: Set of items that open pop-up content when activated, ideal for image galleries or exhibits.
description: Build a friendly grid of story cards that open roomy popups for richer MDX content.
---

# Gallery

`<Gallery>` renders a responsive matrix of clickable figures. Each `<Gallery.Item>` defines the preview (thumbnail, caption text, metadata) and ships its children into a fullscreen popup so authors can reuse any existing MDX component—Viewer, Map, ImageStory, prose, or custom markup.
`<Gallery>` collects a set of story cards and presents them as a friendly grid. Each `<Gallery.Item>` supplies its own thumbnail, caption, and short summary, then opens a roomy popup where you can reuse Viewer, Map, ImageStory, prose, or any custom MDX block to add depth without sending readers to another page.

- Grid columns collapse automatically using CSS grid with sensible spacing.
- Figures render semantic `<figure>`/`<figcaption>` markup so cards keep context in document flow.
- Modals use pure CSS targeting, so the build stays SSR-safe with no extra runtimes. Keyboard users activate the same links to open, close, or step through items.
- Accessibility niceties ship inlined: focus stays trapped inside the active popup, `Esc` closes it, and background scrolling is locked until you exit.
- The popup header mirrors the thumbnail so users keep visual context before diving into the richer MDX body.
- Control the overlay footprint with `popupSize="full" | "medium"`—full overtakes the viewport, while medium keeps page chrome visible and adds rounded/shadowed chrome.
- Randomize tile layouts per build with `order="random"`, handy when you want a fresh arrangement for every publish.
- Reference cached manifests (`referencedManifests`) to auto-populate labels, summaries, and thumbnails when you don't want to repeat metadata by hand.

> Examples pull from the same Northwestern fixtures cached under `.cache/iiif`, so thumbnails and modal content point at manifests you already have locally.

## Example: Modal media wall
Use it when you want to highlight favorite works, curate a mini exhibit, or gather related pieces into a single scan. The example below pulls from the cached Northwestern manifests and shows how a reader can browse tiles at a glance, tap a card, and explore richer notes inside the popup.

<Gallery>
<Gallery.Item
referencedManifests={[
"https://api.dc.library.northwestern.edu/api/v2/works/213f2874-afca-452d-9bf3-ef0fe85a81ae?as=iiif",
]}
title="Seated woman writing"
summary="Mounted watercolor on mica."
thumbnail="https://api.dc.library.northwestern.edu/api/v2/works/213f2874-afca-452d-9bf3-ef0fe85a81ae/thumbnail"
caption="Embassy of Hyderbeck to Calcutta, 1800"
title="Embassy of Hyderbeck to Calcutta, 1800"
summary="This large-scale mezzotint and stipple engraving depicts a diplomatic procession traveling through the Indian landscape en route to Calcutta. At the center of the composition, elaborately dressed figures ride in howdahs atop horses, accompanied by soldiers, attendants, and local travelers carrying baskets and goods."
thumbnail="https://images.collections.yale.edu/iiif/2/ycba:999f94b5-2285-4c99-bc01-786e1bbc942f/full/600,/0/default.jpg"
>
<GalleryContent flex>
<ImageStory
Expand Down Expand Up @@ -197,7 +187,7 @@ description: Set of items that open pop-up content when activated, ideal for ima

Wrap popup bodies with `<GalleryContent>` (or `Gallery.Content`) to reuse the default gutters and the optional flex layout.

| Prop | Type | Required | Notes |
| ---------- | -------- | -------- | --------------------------------------------------------------------- |
| `flex` | boolean | | When `true`, the wrapper switches to a row-based flex layout. |
| `children` | nodes | ✅ | Modal body markup. Works with any MDX content (Viewers, prose, etc.). |
| Prop | Type | Required | Notes |
| ---------- | ------- | -------- | --------------------------------------------------------------------- |
| `flex` | boolean | | When `true`, the wrapper switches to a row-based flex layout. |
| `children` | nodes | ✅ | Modal body markup. Works with any MDX content (Viewers, prose, etc.). |
6 changes: 6 additions & 0 deletions content/docs/releases/releases.data.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
const releases = [
{
"version": "1.8.9",
"date": "2026-02-20",
"summary": "Refine gallery, add item navigation on popup.",
"highlights": []
},
{
"version": "1.8.8",
"date": "2026-02-16",
Expand Down
6 changes: 6 additions & 0 deletions content/docs/releases/releases.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"version": "1.8.9",
"date": "2026-02-20",
"summary": "Refine gallery, add item navigation on popup.",
"highlights": []
},
{
"version": "1.8.8",
"date": "2026-02-16",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@canopy-iiif/app-root",
"version": "1.8.8",
"version": "1.8.9",
"description": "An open-source static site generator designed for fast creation, contextualization, and customization of a discovery-focused digital scholarship and collections website using IIIF APIs.",
"private": true,
"main": "app/scripts/canopy-build.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@canopy-iiif/app",
"version": "1.8.8",
"version": "1.8.9",
"private": false,
"license": "MIT",
"author": "Mat Jordan <mat@northwestern.edu>",
Expand Down
Loading