Skip to content
Klarhimmel UI

Products, slide

Products, slide previewProducts, slide preview

Install

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

One large item card per view, a picture beside its label, name, line and price, with a round previous and next arrow at its sides and two actions centred below.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-slide';
Also called
  • products/slide
About
One large item card per view, a picture beside its label, name, line and price, with a round previous and next arrow at its sides and two actions centred 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 to show a few offers one at a time as big cards, picture beside the text, with arrows to flip through. For all offers visible at once pick products-rows; for quotes in a flip-through pick testimonials-carousel.

Writing for it

- Title up to 120 characters, label up to 60. - One to eight cards: name up to 60, line up to 200, price up to 16, period up to 40, label up to 24. - Arrow words up to 30 characters each.

Watch out for

Arrows jump to the next card, and with a single card they are left out. Keep cards the same height of text or the row jumps in size when swiping.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsSlide props={{
          "eyebrow": "Section name",
          "title": "Say what the items below have in common",
          "items": [
            {
              "media": {
                "src": "/pictures/photo-bakery1.avif",
                "alt": "A bakery counter with loaves and pastries behind glass"
              },
              "badge": "Label",
              "name": "Name the first item",
              "description": "Say in one or two lines what the visitor gets.",
              "price": "00",
              "period": "Say how the price is billed"
            },
            {
              "media": {
                "src": "/pictures/photo-barber1.avif",
                "alt": "An empty barbershop with chairs and mirrors"
              },
              "badge": "Label",
              "name": "Name the second item",
              "description": "Say in one or two lines what the visitor gets.",
              "price": "00",
              "period": "Say how the price is billed"
            }
          ],
          "previousLabel": "Previous item",
          "nextLabel": "Next item",
          "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
eyebrowstring'Section name'Text, up to 60 characters.
titlestring'Say what the items below have in co…'Text, up to 120 characters.
items{ media, badge, name, description, price, period }[]3 itemsList of 1 to 8. Each item: media, badge, name, description, price, period.
previousLabelstring'Previous item'Text, up to 30 characters.
nextLabelstring'Next item'Text, up to 30 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.