Skip to content
Klarhimmel UI

Products, rows

Products, rows previewProducts, rows preview

Install

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

A heading over full-width ruled rows, each with a small square picture, a name, one line, a price and a button at the right.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-rows';
Also called
  • products/rows
About
A heading over full-width ruled rows, each with a small square picture, a name, one line, a price and a button at the right. The heading can instead sit beside a large picture with plain rows (name, label, line, price) and actions below.
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 for a priced list where every row is one offer: a small square picture, a name, one line, a price and a button at the right, or, with layout beside, a large picture next to the heading and plain rows. For cards in a grid pick pricing-split-rows or features-image-cards.

Writing for it

- Name up to 60 characters, line up to 160, price up to 16, period up to 40, badge up to 24. - One to eight rows. A price default is a placeholder like 00, write the real figure. - Rows list hides the picture and button; the beside layout shows the actions under the rows.

Watch out for

A row with no button link still draws, so give each pictured row its own action or the right side looks empty. Long names push the price down on a phone, keep names to one line.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsRows props={{
          "eyebrow": "",
          "title": "Say what the items below have in common",
          "description": "",
          "layout": "stacked",
          "rows": "pictured",
          "media": {
            "src": "/pictures/photo-salon2.avif",
            "alt": "A salon interior in black and white with chairs and mirrors"
          },
          "items": [
            {
              "name": "Name the first item",
              "description": "Say in one line what the visitor gets.",
              "price": "00",
              "period": "Say how the price is billed",
              "badge": "",
              "media": {
                "src": "/pictures/photo-spa1.avif",
                "alt": "A treatment room with a massage table by a window"
              },
              "action": {
                "label": "Main action",
                "href": "#first"
              }
            },
            {
              "name": "Name the second item",
              "description": "Say in one line what the visitor gets.",
              "price": "00",
              "period": "Say how the price is billed",
              "badge": "",
              "media": {
                "src": "/pictures/photo-surf1.avif",
                "alt": "Surfboards lined up against a tree"
              },
              "action": {
                "label": "Main action",
                "href": "#second"
              }
            }
          ]
        }} />
      </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''Text, up to 60 characters.
titlestring'Say what the items below have in co…'Text, up to 120 characters.
descriptionstring''Text, up to 240 characters.
layout'stacked' | 'beside''stacked'One of 'stacked', 'beside'.
rows'pictured' | 'list''pictured'One of 'pictured', 'list'.
mediaMedia{…}See the type.
items{ name, description, price, period, badge, media, action }[]3 itemsList of 1 to 8. Each item: name, description, price, period, badge, media, action (optional).
primaryLink-Optional; empty is not rendered.
secondaryLink-Optional; empty is not rendered.
textLinkLink-Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.