Skip to content
Klarhimmel UI

Products, action mosaic

Products, action mosaic previewProducts, action mosaic preview

Install

npx shadcn add @klarhimmel/products-action-mosaic
DetailsAbout, usage, props and more

A heading with a lead above a six-column mosaic of unequal tiles: a large picture card, narrow text tiles and picture tiles, each with its own button or link inside.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-action-mosaic';
Also called
  • products/action-mosaic
About
A heading with a lead above a six-column mosaic of unequal tiles: a large picture card, narrow text tiles and picture tiles, each with its own button or link inside. Each tile sets its size and whether it has a picture.
Category
Things for sale as cards, rows or one featured item, each with a name, a price and its own action. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it when each tile of an uneven mosaic needs its own button or link, as with a flagship product beside smaller ones and a wide closing tile. For a fixed set of tile kinds with a price choose products-tile-mosaic; for plain feature cards choose features-grid.

Writing for it

- Title up to 120 characters, lead up to 240, three to eight tiles. - Each tile has a kind (picture or text), a size (large, wide or narrow), a title up to 80 and a line up to 200. - Button and text link labels up to 40 characters each, both optional.

Watch out for

A large tile takes two rows, so tiles after it fill beside it; check the order on a phone where all stack in one column. Give narrow text tiles a short line and keep one large tile only, or the grid leaves gaps.

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 ProductsActionMosaic from '@/components/klarhimmel/blocks/products-action-mosaic';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsActionMosaic props={{
          "eyebrow": "Section name",
          "title": "Say what the visitor can choose from",
          "description": "Say in one or two sentences what the tiles show.",
          "items": [
            {
              "kind": "picture",
              "size": "large",
              "media": {
                "src": "/pictures/photo-gelato1.avif",
                "alt": "Tubs of gelato in a display case"
              },
              "badge": "Label",
              "title": "Name the large item",
              "description": "Describe the item and its benefit in two sentences.",
              "action": {
                "label": "Main action",
                "href": "#first"
              },
              "actionStyle": "primary",
              "more": {
                "label": "Text link",
                "href": "#more"
              }
            }
          ]
        }} />
      </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'Section name'Text, up to 60 characters.
titlestring'Say what the visitor can choose from'Text, up to 120 characters.
descriptionstring'Say in one or two sentences what th…'Text, up to 240 characters.
items{ kind, size, media, badge, title, description, action, actionStyle, more }[]5 itemsList of 3 to 8. Each item: kind ('picture' | 'text'), size ('large' | 'wide' | 'narrow'), media, badge, title, description, action, actionStyle ('primary' | 'secondary'), more.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.