Skip to content
Klarhimmel UI

Products, tiles with links

Products, tiles with links previewProducts, tiles with links preview

Install

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

A tall picture tile on the left beside two tiles stacked on the right: a heading tile (label, heading, line) and a tile with a list of navigation links, two actions and…

Import

Import

import Block from '@/components/klarhimmel/blocks/products-tile-links';
Also called
  • products/tile-links
About
A tall picture tile on the left beside two tiles stacked on the right: a heading tile (label, heading, line) and a tile with a list of navigation links, two actions and a small link. On a phone the three tiles stack.
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 a section is a tile composition: a tall picture at the left and, stacked at the right, a heading tile and a tile of site navigation links with two actions. For plain cards in a grid use features-image-cards; for a picture beside one product's details use products-featured-split.

Writing for it

- The title holds 120 characters, the line under it 200. Keep both short, the tile is narrow. - Two to eight links, each label up to 40 characters, one per row with a hairline between. - Two actions and one small link with an arrow; empty a label to drop it.

Watch out for

The picture tile stretches to the height of the two tiles, so a portrait photo works best. On a phone the tiles stack in picture, heading, links order. More than six links makes the right column taller than the picture needs.

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 ProductsTileLinks from '@/components/klarhimmel/blocks/products-tile-links';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsTileLinks props={{
          "media": {
            "src": "/pictures/photo-book3.avif",
            "alt": "A wooden shelf of books"
          },
          "eyebrow": "Name the section",
          "title": "Say what the visitor finds here",
          "description": "Say in one line where the links below lead.",
          "links": [
            {
              "label": "Name a page",
              "href": "#one"
            },
            {
              "label": "Name a page",
              "href": "#two"
            },
            {
              "label": "Name a page",
              "href": "#three"
            },
            {
              "label": "Name a page",
              "href": "#four"
            }
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "textLink": {
            "label": "Link label",
            "href": "#more"
          }
        }} />
      </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
mediaMedia{…}See the type.
eyebrowstring'Name the section'Text, up to 60 characters.
titlestring'Say what the visitor finds here'Text, up to 120 characters.
descriptionstring'Say in one line where the links bel…'Text, up to 200 characters.
linksLink[]4 itemsList of 2 to 8.
primaryLink{…}See the type.
secondaryLink{…}See the type.
textLinkLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.