Products, sticky stack


Install
npx shadcn add @klarhimmel/products-sticky-stackDetailsAbout, 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
- 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.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the stacked items have in …' | Text, up to 120 characters. |
description | string | 'Say in one or two sentences what th…' | Text, up to 240 characters. |
items | { icon, step, name, description, points, action, secondary, media }[] | 3 items | List 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. |