Skip to content
Klarhimmel UI

Feed, two columns

Feed, two columns previewFeed, two columns preview

Install

npx shadcn add https://ui.klarhimmel.com/r/feed-masonry.json
DetailsAbout, usage, props and more

A heading and a line over two columns of cards, each a picture as tall as its shape with a caption and a small arrow under it, fading out at the bottom.

Import

Import

import Block from '@/components/klarhimmel/blocks/feed-masonry';
Also called
  • gallery/feed-masonry
About
A heading and a line over two columns of cards, each a picture as tall as its shape with a caption and a small arrow under it, fading out at the bottom. Use to show a body of work or many examples at a glance.
Category
A grid of images with captions. New project? Set it up once: /get-started/installation.

Notes

When to use it

A heading and a line over two columns of cards, each a picture with a caption and a small arrow under it, fading out at the bottom. Use gallery-grid for plain pictures.

Writing for it

- Mix tall 9 by 16 and wide 16 by 9 frames, since the two columns take the items in turn. - Write each caption as one or two sentences on what the piece is and what it asked for. - Say in the line whose work this is and what it has in common.

Watch out for

The fade at the bottom hides the end of the last cards on purpose, so a link to the full set should follow. Pictures of one shape make the columns look flat.

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 FeedMasonry from '@/components/klarhimmel/blocks/feed-masonry';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FeedMasonry props={{
          "title": "Name what the wall shows",
          "description": "Say whose work this is and what it has in common",
          "items": [
            {
              "shape": "tall",
              "media": {
                "src": "/pictures/photo-bike3.avif",
                "alt": "A bicycle in a workshop with tools on the wall behind"
              },
              "caption": "Say in a sentence or two what this piece is, who it was for and what it asked of you"
            },
            {
              "shape": "wide",
              "media": {
                "src": "/pictures/photo-book3.avif",
                "alt": "A wooden shelf of books"
              },
              "caption": "Say in a sentence or two what this piece is, who it was for and what it asked of you"
            },
            {
              "shape": "wide",
              "media": {
                "src": "/pictures/photo-brk1.avif",
                "alt": "A breakfast plate of fruit with orange juice"
              },
              "caption": "Say in a sentence or two what this piece is, who it was for and what it asked of you"
            }
          ]
        }} />
      </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
titlestring'Name what the wall shows'Text, up to 48 characters.
descriptionstring'Say whose work this is and what it …'Text, up to 120 characters.
items{ shape, media, caption }[]6 itemsList of 4 to 12. Each item: shape ('tall' | 'wide'), media, caption.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.