# Gallery, thumbs

- **[Sections](/blocks/)**
- **[Gallery](/blocks/gallery/)**
- **Gallery, thumbs**

A header row (label, heading, lead) with two actions beside it, then one large wide picture with a caption and a strip of thumbnails beneath; choosing a thumbnail swaps…

## Import

- **CLI**

  ```
  npx shadcn add https://ui.klarhimmel.com/r/gallery-thumbs.json
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/gallery-thumbs';
  ```

Also called

- gallery/thumbs

- **About**: A header row (label, heading, lead) with two actions beside it, then one large wide picture with a caption and a strip of thumbnails beneath; choosing a thumbnail swaps the large picture, with no script.
- **Category**: A grid of images with captions. New project? Set it up once: /get-started/installation.

## Notes

- **When to use it**: Pick it when one picture should lead and a short strip of alternates lets the visitor swap it, with a header and two actions above. Pick `gallery-featured` when a lead picture sits beside smaller captioned ones that all stay visible, or `gallery-grid` when every picture carries equal weight.
- **Writing for it**: - Two to eight items, each a picture and a caption of up to 140 characters.
- Title up to 120 characters, lead up to 240, label up to 60.
- Give every picture alt text that names its subject, since the thumbnail is the only label.
- **Watch out for**: Pictures of different ratios get cropped to wide and four-by-three, so frame the subject in the middle. More than four items wrap to a second thumbnail row; keep it to four for a clean strip.

## Pairs well with

- **[Features, grid](/blocks/features/grid)**
- **[Call to action, band](/blocks/cta/banner)**
- **[Testimonials, side](/blocks/testimonials/side)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import GalleryThumbs from '@/components/klarhimmel/blocks/gallery-thumbs';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <GalleryThumbs props={{
          "eyebrow": "Section name",
          "title": "Say what the pictures show",
          "description": "Say what the visitor is about to look at and why it matters.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "items": [
            {
              "media": {
                "src": "/pictures/photo-brk1.avif",
                "alt": "A breakfast plate of fruit with orange juice"
              },
              "caption": "Say what this picture shows"
            },
            {
              "media": {
                "src": "/pictures/photo-camp1.avif",
                "alt": "Tents pitched on grass above a lake"
              },
              "caption": "Say what this picture shows"
            },
            {
              "media": {
                "src": "/pictures/photo-clean1.avif",
                "alt": "A bright white kitchen with a marble island"
              },
              "caption": "Say what this picture shows"
            },
            {
              "media": {
                "src": "/pictures/photo-coffee2.avif",
                "alt": "Coffee beans and ground coffee on a wooden board"
              },
              "caption": "Say what this picture shows"
            }
          ]
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **eyebrow**: Text, up to 60 characters.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 240 characters.
- **primary**: See the type.
- **secondary**: Optional; empty is not rendered.
- **items**: List of 2 to 8. Each item: media, caption.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

[Previous](/blocks/gallery/strip)

[Next](/blocks/directory/cards)
