Skip to content
Klarhimmel UI

Products, stepped cards

Products, stepped cards previewProducts, stepped cards preview

Install

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

A heading with a lead at the top left, then three cards in a row that each sit lower than the one before, so they read as a diagonal.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-stepped-cards';
Also called
  • products/stepped-cards
About
A heading with a lead at the top left, then three cards in a row that each sit lower than the one before, so they read as a diagonal.
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 two or three products or services that should read as a path down the page, each card with its own picture, line, price and action, under a heading at the top left. For an even row choose features-grid; for pricing plans with no pictures choose pricing-split-rows.

Writing for it

- Title up to 120 characters, lead up to 240, eyebrow up to 60. - Two or three cards, each with a name up to 60, a line up to 160 and up to four points of 60. - Price up to 16 characters, period up to 40, card action and the two closing actions up to 40 each.

Watch out for

The steps only show from a tablet width up and are lost on a phone. Use the open look for plain pages and the boxed look when each card carries its own button; leave badge, price or points empty on a card that has none, and keep card lengths alike so the diagonal stays clear.

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 ProductsSteppedCards from '@/components/klarhimmel/blocks/products-stepped-cards';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsSteppedCards props={{
          "look": "open",
          "eyebrow": "Section name",
          "title": "Say what the visitor can choose from",
          "description": "Say in one sentence what the items have in common.",
          "items": [
            {
              "media": {
                "src": "/pictures/photo-surf1.avif",
                "alt": "Surfboards lined up against a tree"
              },
              "badge": "Label",
              "name": "Name the first item",
              "description": "Say in one line what it gives the visitor.",
              "points": [
                "Name one thing inside"
              ],
              "price": "00",
              "period": "per period",
              "cta": {
                "label": "",
                "href": ""
              }
            }
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          }
        }} />
      </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
look'open' | 'boxed''open'One of 'open', 'boxed'.
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 sentence what the items …'Text, up to 240 characters.
items{ media, badge, name, description, points, price, period, cta }[]3 itemsList of 2 to 3. Each item: media, badge, name, description, points, price, period, cta.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.