Skip to content
Klarhimmel UI

Products, picker

Products, picker previewProducts, picker preview

Install

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

A large picture with a label, big heading, lead and two actions on the left, beside a narrow list of item cards on the right, each with a name, an optional label, one…

Import

Import

import Block from '@/components/klarhimmel/blocks/products-picker';
Also called
  • products/picker
About
A large picture with a label, big heading, lead and two actions on the left, beside a narrow list of item cards on the right, each with a name, an optional label, one line and a price.
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 one large picture and pitch should sit beside a short menu of choices such as plans, editions or models, each card a link to its own page. For a plain pitch with no list pick hero-split; for stacked rows pick products-rows.

Writing for it

- Title up to 100 characters, lead up to 240, list title up to 80. - Two to six cards: name up to 40, label up to 24, line up to 120, price up to 16, period up to 30. - Every card needs a link target.

Watch out for

The first card always looks chosen, so put the item you want to lead with first. The cards go to other places and do not change the picture, so do not promise a preview.

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 ProductsPicker from '@/components/klarhimmel/blocks/products-picker';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsPicker props={{
          "eyebrow": "Section name",
          "title": "Say what the visitor can pick here",
          "description": "Say in one or two sentences what the items are and who they are for.",
          "media": {
            "src": "/pictures/photo-wood3.avif",
            "alt": "A workbench with hand tools on the wall"
          },
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "listTitle": "Name the list of items",
          "items": [
            {
              "name": "Name the first item",
              "badge": "Label",
              "description": "Say in one line what the visitor gets.",
              "price": "00",
              "period": "billing period",
              "href": "#first"
            },
            {
              "name": "Name the second item",
              "badge": "",
              "description": "Say in one line what the visitor gets.",
              "price": "00",
              "period": "billing period",
              "href": "#second"
            },
            {
              "name": "Name the third item",
              "badge": "Label",
              "description": "Say in one line what the visitor gets.",
              "price": "00",
              "period": "billing period",
              "href": "#third"
            }
          ]
        }} />
      </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 pick here'Text, up to 100 characters.
descriptionstring'Say in one or two sentences what th…'Text, up to 240 characters.
mediaMedia{…}See the type.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}Optional; empty is not rendered.
listTitlestring'Name the list of items'Text, up to 80 characters.
items{ name, badge, description, price, period, href }[]3 itemsList of 2 to 6. Each item: name, badge, description, price, period, href.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.