Skip to content
Klarhimmel UI

Products, cover with link bar

Products, cover with link bar previewProducts, cover with link bar preview

Install

npx shadcn add @klarhimmel/products-cover-link-bar
DetailsAbout, usage, props and more

A full-bleed picture with a giant heading and a label at its foot, then a separate bar under it with a row of navigation links at the left and two actions at the right.

Import

Import

import Block from '@/components/klarhimmel/blocks/products-cover-link-bar';
Also called
  • products/cover-link-bar
About
A full-bleed picture with a giant heading and a label at its foot, then a separate bar under it with a row of navigation links at the left and two actions at the right. On a phone the actions wrap under the links.
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 page opens on a full-height picture with a giant heading, and the way on is a bar of navigation links and actions under it. When the actions sit on the picture use hero-cover; for a heading with no picture use hero-minimal.

Writing for it

- The title holds 80 characters; it is set very large, so use two to five words. - Two to eight links in the bar, each label 40 characters at most, and two actions. - The label above the heading holds 60 characters and is optional.

Watch out for

A dark overlay sits on the picture so the heading stays readable; a very dark photo needs no more. A long title shrinks in size on narrow containers but can still wrap onto four lines, so keep it 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 ProductsCoverLinkBar from '@/components/klarhimmel/blocks/products-cover-link-bar';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ProductsCoverLinkBar props={{
          "media": {
            "src": "/pictures/photo-coffee2.avif",
            "alt": "Coffee beans and ground coffee on a wooden board"
          },
          "eyebrow": "Name the section",
          "title": "Say what the page offers",
          "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"
          }
        }} />
      </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 page offers'Text, up to 80 characters.
linksLink[]4 itemsList of 2 to 8.
primaryLink{…}See the type.
secondaryLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.