Skip to content
Klarhimmel UI

Products, featured split

Products, featured split previewProducts, featured split preview

Install

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

A heading row, then one product shown whole: a captioned picture on the left, and on the right a badge, name, line, a ticked list of points, the price and two actions.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-featured-split';
Also called
  • products/featured-split
About
A heading row, then one product shown whole: a captioned picture on the left, and on the right a badge, name, line, a ticked list of points, the price and two actions. On a phone the picture sits above the details.
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 product deserves a whole section: a captioned picture on one side and its badge, name, points, price and actions on the other. For a hero at the top of a page use hero-split; for a lead product among several siblings use products-feature-stack.

Writing for it

- The title holds 120 characters and the lead 240; the caption under the picture holds 120. - The product takes a badge of 24, a name of 80, a line of 200, two to five ticked points of 80 each, a price of 16 with a period of 40, and one or two actions.

Watch out for

The picture is drawn at four to three, so choose a photo that survives a crop. Keep points to one line each; a long point pushes the price and actions down and unbalances the two sides. Do not repeat the heading as the product name.

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 ProductsFeaturedSplit from '@/components/klarhimmel/blocks/products-featured-split';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsFeaturedSplit props={{
          "eyebrow": "Section name",
          "title": "Say which product this page is about",
          "description": "Say why this product is worth a closer look, briefly.",
          "media": {
            "src": "/pictures/photo-pool1.avif",
            "alt": "An indoor pool with marked lanes"
          },
          "caption": "Say what the picture shows.",
          "badge": "Label",
          "name": "Name the product",
          "summary": "Describe the product in one or two sentences.",
          "points": [
            "Name one point",
            "Name one point",
            "Name one point"
          ],
          "price": "00",
          "period": "billing period",
          "primary": {
            "label": "Main action",
            "href": "#buy"
          },
          "secondary": {
            "label": "Second action",
            "href": "#details"
          }
        }} />
      </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 which product this page is about'Text, up to 120 characters.
descriptionstring'Say why this product is worth a clo…'Text, up to 240 characters.
mediaMedia{…}See the type.
captionstring'Say what the picture shows.'Text, up to 120 characters.
badgestring'Label'Text, up to 24 characters.
namestring'Name the product'Text, up to 80 characters.
summarystring'Describe the product in one or two …'Text, up to 200 characters.
pointsstring[]3 itemsList of 2 to 5.
pricestring'00'Text, up to 16 characters.
periodstring'billing period'Text, up to 40 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.