Skip to content
Klarhimmel UI

Products, picture and chips

Products, picture and chips previewProducts, picture and chips preview

Install

npx shadcn add @klarhimmel/products-picture-chips
DetailsAbout, usage, props and more

A wide picture first, then a centred large heading with two actions, then a wrapped centred row of pill links. On a phone the pills wrap onto more lines.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-picture-chips';
Also called
  • products/picture-chips
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 the picture opens the section and a short centred heading with two actions follows, ending in a row of pill links to the things on offer. When the text sits above the picture use hero-centered; for a row of logos rather than links use logos-strip.

Writing for it

- The title holds 120 characters and reads best in under eight words. Two actions, each label up to 40. - Two to twelve pills, each label 40 characters at most; name the thing it opens, not the word more. - The picture is wide, sixteen to nine; give it alt text.

Watch out for

More than about eight pills wrap onto a third line on a phone and bury the actions' purpose. Pills are plain links, so each needs a real address. A tall photo is cropped, so keep its subject in the centre.

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 ProductsPictureChips from '@/components/klarhimmel/blocks/products-picture-chips';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsPictureChips props={{
          "media": {
            "src": "/pictures/photo-book3.avif",
            "alt": "A wooden shelf of books"
          },
          "title": "Say what the page is about",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "chips": [
            {
              "label": "Name an item",
              "href": "#one"
            },
            {
              "label": "Name an item",
              "href": "#two"
            },
            {
              "label": "Name an item",
              "href": "#three"
            },
            {
              "label": "Name an item",
              "href": "#four"
            },
            {
              "label": "Name an item",
              "href": "#five"
            }
          ]
        }} />
      </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
mediaMedia{…}See the type.
titlestring'Say what the page is about'Text, up to 120 characters.
primaryLink{…}See the type.
secondaryLink{…}See the type.
chipsLink[]5 itemsList of 2 to 12.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.