Gallery, thumbs


Install
npx shadcn add https://ui.klarhimmel.com/r/gallery-thumbs.jsonDetailsAbout, usage, props and more
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
Import
- 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
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the pictures show' | Text, up to 120 characters. |
description | string | 'Say what the visitor is about to lo…' | Text, up to 240 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
items | { media, caption }[] | 4 items | List of 2 to 8. Each item: media, caption. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |