---
title: "gallery"
description: "Two to four photos or screenshots under the title, filling the slide in an asymmetric arrangement."
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/deckster/llms.txt
> Use this file to discover all available pages before exploring further.

# gallery

Use the `gallery` layout to show two to four pictures together: screens of a product or a flow, or one subject seen from several places. The first picture is the lead and takes the largest frame; the others share the rest, each with an optional caption under it.

## Example

[Live slide: "Booked at 08:42, at the door at 09:21", slide 156 of the lookbook deck](https://sandrinodm.github.io/deckster/decks/lookbook/#/gallery-places)

`decks/lookbook/slides/gallery-places.mdx`:

```mdx
---
layout: gallery
title: Booked at 08:42, at the door at 09:21
eyebrow: One loaf, three places
surface: default
pictures:
  - src: ../assets/scenes/handover.svg
    alt: Aoife hands a warm Brightloaf bag to an older woman at her front door, the hall lit behind her
    caption: "09:21 · At the door of 14 Weir Street, flat 2"
    focal: 66% 50%
  - src: ../assets/scenes/inside-the-hub.svg
    alt: Inside the Old Town hub, a rider scanning a parcel's label beside the racks and a parked cargo bike
    caption: "08:50 · Into slot B3 at the Old Town hub"
    focal: 35% 50%
  - src: ../assets/scenes/rider-old-town.svg
    alt: Aoife riding through an Old Town street in morning sun, a Brightloaf bag on the box
    caption: "08:51 · Out on loop 14, stop 7 of 9"
    focal: 75% 55%
budget: 25s
---

Brightloaf's loaf for 14 Weir Street: 31 minutes from the rack to the door.

<Notes>
`gallery` with three pictures and captions on the default surface; use it for one subject seen in three places or moments, the one that matters most as the lead.
Start at the door: 09:21, three minutes before the time we promised, the loaf still warm. It got there like every drop does. At ten to nine it went into slot B3 at the Old Town hub; a minute later Aoife's loop left with it, seventh of nine stops.
</Notes>
```

Notice three things in the source. The doorstep photo comes first, so it is the lead on the left. Each picture has a `focal:` that keeps its subject in view when the frame crops it. And `surface: default` sets the slide on the brand's default surface instead of the layout's own, `inverse`.

## When to use it

- You have two to four pictures and one point about them. `pictures:` is required and takes two to four entries; the title (up to 60 characters) says what they show together.
- One picture matters most. Put it first: with two pictures the lead takes the left two thirds and the other a tall frame, as a phone screen needs; with three it takes the left seven columns; with four, the left half.
- The words are short. The body is one sentence of at most 14 words, and a caption is at most 64 characters, or 40 when there are four pictures.
- Screenshots should not be cropped. Set `fit: contain` on each one to show it whole, as the lookbook's `gallery-screens` slide does.

Pick another layout when the pictures are not the whole slide:

- One picture with text beside it: use [`split`](https://sandrinodm.github.io/deckster/reference/layouts/split/).
- One photo across the slide: use [`image`](https://sandrinodm.github.io/deckster/reference/layouts/image/).
- Pictures mixed with figures: use [`bento`](https://sandrinodm.github.io/deckster/reference/layouts/bento/).
- One product screen to look at closely: use [`screen`](https://sandrinodm.github.io/deckster/reference/layouts/screen/).
- Two pictures of one thing before and after a change: use [`before-after`](https://sandrinodm.github.io/deckster/reference/layouts/before-after/).

## Reference

Frontmatter: `layout: gallery`; surface: `inverse`; title: required, 60 characters at most; PowerPoint: title-only slide.

Two to four photos or screenshots under the title, filling the slide in an asymmetric arrangement: the first picture is the lead and takes the largest frame on the left, the others share the right. Each picture, from `pictures:`, has `src` and `alt` and optionally a `caption` set under it, never over it; `fit: contain` shows a screenshot whole instead of cropping it. Defaults to the inverse surface, where screens and photos read like prints on a light table. Use it for product shots, screens of a flow, or a site from several sides; use before-after for two pictures of one change, split for one picture with text beside it, image for one photo across the slide, and bento when the pictures share the slide with figures.

*Slide still (a lookbook slide in this layout, not the example below): A slide in the gallery layout: Four screens run on one stream of events.* [Open the slide](https://sandrinodm.github.io/deckster/decks/lookbook/#/gallery-screens)

**Slots**

| Slot | Required | Takes | Budget | What goes in it |
| --- | --- | --- | --- | --- |
| `body` | no | text | 14 words | One sentence under the title on what the pictures show together. Put the pictures in `pictures:`, not here. |
| `<Footnote>` | no | text | 20 words | A source or credit for the pictures, on the bottom line. |

**Frontmatter fields**

| Field | Values | How to use it |
| --- | --- | --- |
| `eyebrow` | text | Write a few words of at most 40 characters, for example `eyebrow: Budget committee`, or leave it out. |
| `pictures` (required) | text | List 2 to 4 pictures, the lead first, each with `src` (a file in the deck folder, such as assets/street.jpg), `alt` (what it shows, up to 120 characters) and optionally `caption` (up to 64, 40 with four pictures), `fit: contain` for a screenshot to show whole, and `focal`. Name the part of the photo to keep when it is cropped, as a CSS position: `focal: top`, `focal: center 30%` (a face in the upper third) or `focal: 40% 20%`. |
| `treatment` | text | Name one of the brand's image treatments, for example `treatment: plain` (every brand has it) to show a screenshot, map or chart in its own colors; `deck brand --json` lists them under imagery.treatments. |
| `chrome` | `true` (default), `false` | Write `chrome: false` to hide the page number, logo and progress bar on this slide, or `chrome: true` to show them. |

**Variants**

- four pictures — `pictures[].caption`: 40 characters

**Example**

```mdx
---
layout: gallery
title: "Three streets, three summers after planting"
eyebrow: Eastgate pilot
pictures:
  - src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' fill='%238fa79a'/%3E%3Ccircle cx='40' cy='34' r='30' fill='%235d7d6b'/%3E%3Ccircle cx='118' cy='30' r='34' fill='%234f6e5d'/%3E%3Crect y='66' width='160' height='24' fill='%23707786'/%3E%3C/svg%3E"
    alt: "Harrow Road in July, under young plane trees"
    caption: "Harrow Road: shade on both pavements by the third July."
  - src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' fill='%238fa79a'/%3E%3Ccircle cx='40' cy='34' r='30' fill='%235d7d6b'/%3E%3Ccircle cx='118' cy='30' r='34' fill='%234f6e5d'/%3E%3Crect y='66' width='160' height='24' fill='%23707786'/%3E%3C/svg%3E"
    alt: Mill Lane with a row of new limes
    caption: "Mill Lane: limes planted in soil cells."
  - src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'%3E%3Crect width='160' height='90' fill='%238fa79a'/%3E%3Ccircle cx='40' cy='34' r='30' fill='%235d7d6b'/%3E%3Ccircle cx='118' cy='30' r='34' fill='%234f6e5d'/%3E%3Crect y='66' width='160' height='24' fill='%23707786'/%3E%3C/svg%3E"
    alt: Station Square with oaks around the benches
    caption: "Station Square: oaks where the benches are."
---

<Footnote>Photos: Larkfield Urban Forestry Division, July 2026.</Footnote>

<Notes>
Start with Harrow Road, the largest picture: it was bare tarmac three years ago.
</Notes>
```

## Common mistakes

- **Putting the pictures in the body.** The pictures belong in `pictures:`; the body is one sentence. A list in the body fails [`deck lint`](https://sandrinodm.github.io/deckster/review/lint/) with `slot-content`: "The body slot holds a list of 2 items; the gallery layout sets it as text."
- **Long captions with four pictures.** The four-picture variant cuts captions to 40 characters. A 45-character caption is a `schema` error: "pictures[0].caption: The gallery layout sets at most 40 characters here (four pictures), got 45."
- **A wrong path.** A `src` that names no file is a `media-missing` error that prints the path it looked for. Paths are relative to the slide file with `./` or `../`, or written from the deck folder (`assets/street.jpg`).
- **A fifth picture.** `pictures:` takes at most four. Split the set over two slides, or pick the four that make the point.
- **Text over the photo.** The layout never sets text over a picture; a caption always stands under its picture. For a line over a photo, use `image`.

## Related layouts

- [`split`](https://sandrinodm.github.io/deckster/reference/layouts/split/): one picture with a title and text beside it.
- [`image`](https://sandrinodm.github.io/deckster/reference/layouts/image/): one photo edge to edge, with optional text over a scrim.
- [`bento`](https://sandrinodm.github.io/deckster/reference/layouts/bento/): tiles of unequal weight that mix pictures with figures and text.
- [`screen`](https://sandrinodm.github.io/deckster/reference/layouts/screen/): one product screen shown whole in a drawn frame, with numbered callouts.
- [`before-after`](https://sandrinodm.github.io/deckster/reference/layouts/before-after/): two pictures at the same size, labelled Before and After.

How image paths resolve and what `deck lint` checks about images is on [media](https://sandrinodm.github.io/deckster/write-slides/media/).

Source: https://sandrinodm.github.io/deckster/reference/layouts/gallery/index.mdx
