Skip to content
Klarhimmel UI

Gallery, stepped diagonal

Gallery, stepped diagonal previewGallery, stepped diagonal preview

Install

npx shadcn add @klarhimmel/gallery-stepped
DetailsAbout, usage, props and more

Three captioned pictures stepping down and across in a diagonal, with the label, heading, line, two buttons and a quiet underlined link tucked into the space at the…

Import

Import

import Block from '@/components/klarhimmel/blocks/gallery-stepped';
Also called
  • gallery/stepped
About
Three captioned pictures stepping down and across in a diagonal, with the label, heading, line, two buttons and a quiet underlined link tucked into the space at the lower left.
Category
A grid of images with captions. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it for a gallery of exactly three captioned pictures that should read as a path across the page, with the heading and two buttons filling the empty corner under the first picture. For an even set choose gallery-grid; for one lead picture and smaller ones choose gallery-featured.

Writing for it

- Title up to 120 characters, line up to 240, eyebrow up to 60. - Exactly three pictures, each with a caption up to 120 characters. - Two buttons and one quiet link, each label up to 40 characters; the second button and the link may be left out.

Watch out for

The diagonal only shows at wide widths; on a phone it stacks with small steps. Use three pictures of the same ratio, and keep captions short so the steps stay clear.

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 GalleryStepped from '@/components/klarhimmel/blocks/gallery-stepped';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <GalleryStepped props={{
          "eyebrow": "Name the topic",
          "title": "Say what the pictures show",
          "description": "Say in one line what the visitor sees and why it matters.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#more"
          },
          "more": {
            "label": "Name where it leads",
            "href": "#details"
          },
          "shots": [
            {
              "media": {
                "src": "/pictures/photo-pool1.avif",
                "alt": "An indoor pool with marked lanes"
              },
              "caption": "Say what this picture shows"
            },
            {
              "media": {
                "src": "/pictures/photo-rest1.avif",
                "alt": "An empty dining room with long tables and pendant lamps"
              },
              "caption": "Say what this shows"
            },
            {
              "media": {
                "src": "/pictures/photo-salon2.avif",
                "alt": "A salon interior in black and white with chairs and mirrors"
              },
              "caption": "Say what this 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.

PropTypeDefaultDescription
eyebrowstring'Name the topic'Text, up to 60 characters.
titlestring'Say what the pictures show'Text, up to 120 characters.
descriptionstring'Say in one line what the visitor se…'Text, up to 240 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
moreLink{…}Optional; empty is not rendered.
shots{ media, caption }[]3 itemsList of 3 to 3. Each item: media, caption.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.