Gallery, scattered pictures


Install
npx shadcn add @klarhimmel/gallery-scatteredDetailsAbout, usage, props and more
A centred label, heading, lead and two buttons in the middle of a tall section, with four rounded pictures of different sizes scattered round them at the corners.
Import
Import
- gallery/scattered
- About
- A centred label, heading, lead and two buttons in the middle of a tall section, with four rounded pictures of different sizes scattered round them at the corners. On a phone the text comes first and the pictures follow in two columns.
- Category
- A grid of images with captions. New project? Set it up once: /get-started/installation.
Notes
When to use it
Pick it when pictures should frame a short invitation rather than fill a grid: a centred heading and two buttons with four pictures scattered round them. For an even grid choose gallery-grid; for pictures stepping along a diagonal choose gallery-stepped.
Writing for it
- Title up to 100 characters, lead up to 240; exactly four pictures: wide, upright, square, wide, in that order. - Two buttons, the second optional.
Watch out for
The scatter only shows from about 56 rem and the section is tall (about 55 rem) there. On a phone the text comes first and the pictures follow in two columns.
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 | 'Name the topic' | Text, up to 60 characters. |
title | string | 'Say what the pictures show' | Text, up to 100 characters. |
description | string | 'Say in one or two sentences what th…' | Text, up to 240 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
pictures | Media[] | 4 items | List of 4 to 4. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |