Skip to content
Klarhimmel UI

Products, sticky stack

Products, sticky stack previewProducts, sticky stack preview

Install

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

A heading block (label, title, lead) that stays pinned at the top while full-width cards slide up beneath it and stack, each card pinned a little lower than the last…

Import

Import

import Block from '@/components/klarhimmel/blocks/products-sticky-stack';
Also called
  • products/sticky-stack
About
A heading block (label, title, lead) that stays pinned at the top while full-width cards slide up beneath it and stack, each card pinned a little lower than the last: icon and step label, name, line, check points and two actions on the…
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 few steps or products that should pile up as the visitor scrolls, each a full-width card with its picture. When the cards should sit side by side use features-image-cards, and for an intro pinned beside the cards use features-stacked-cards.

Writing for it

- Title 120 characters, lead 240, two to six cards. A card takes a name of 60, a line of 200 and up to five points of 80. - Keep every card about the same height, since each one covers the card before it while it rises.

Watch out for

The pinned heading eats vertical space, so three long headline lines leave little room for the cards on a short screen. Keep the title to one or two lines and the lead short.

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 ProductsStickyStack from '@/components/klarhimmel/blocks/products-sticky-stack';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsStickyStack props={{
          "eyebrow": "Section name",
          "title": "Say what the stacked items have in common",
          "description": "Say in one or two sentences what the visitor finds in the cards below.",
          "items": [
            {
              "icon": "clock",
              "step": "Step label",
              "name": "Name the first item",
              "description": "Say in one line what the visitor gets from this item.",
              "points": [
                "Say what it gives the visitor"
              ],
              "action": {
                "label": "Main action",
                "href": "#first"
              },
              "secondary": {
                "label": "Text link",
                "href": "#first-more"
              },
              "media": {
                "src": "/pictures/photo-rest1.avif",
                "alt": "An empty dining room with long tables and pendant lamps"
              }
            }
          ]
        }} />
      </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 stacked items have in …'Text, up to 120 characters.
descriptionstring'Say in one or two sentences what th…'Text, up to 240 characters.
items{ icon, step, name, description, points, action, secondary, media }[]3 itemsList of 2 to 6. Each item: icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), step, name, description, points, action, secondary, media.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.