Skip to content
Klarhimmel UI

Contact, picture panel

Contact, picture panel previewContact, picture panel preview

Install

npx shadcn add @klarhimmel/contact-visual-panel
DetailsAbout, usage, props and more

A heading with its label and lead, a large rounded picture under it, and a white card on the picture at its lower left holding a name, icon lines for address, phone…

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-visual-panel';
Also called
  • contact/visual-panel
About
A heading with its label and lead, a large rounded picture under it, and a white card on the picture at its lower left holding a name, icon lines for address, phone, date or time, optional opening hours and buttons.
Category
A form, a booking panel or office details. The page wires the submit. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it when the place itself is the contact: a large picture with a card on it that holds the address, phone, date or time. Use actions header when the section opens on a display heading with its buttons beside it, and actions card when the buttons belong with the details. For a card beside the picture rather than on it pick contact-overlap-card.

Writing for it

- Title up to 100 characters; titleSize display for a large opening line. - Up to five icon lines of up to 80 characters, and up to six opening-hours rows. - Card name up to 60 characters.

Watch out for

The card covers the lower left of the picture, so keep the subject of the photo to the right. On a phone the card sits at the foot of the picture and the picture grows to hold it.

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 ContactVisualPanel from '@/components/klarhimmel/blocks/contact-visual-panel';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactVisualPanel props={{
          "eyebrow": "Name the section",
          "title": "Say how a visitor reaches you",
          "description": "Say in one line when you answer.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "media": {
            "src": "/pictures/photo-pool1.avif",
            "alt": "An indoor pool with marked lanes"
          },
          "cardTitle": "Name the place",
          "lines": [
            {
              "kind": "address",
              "value": "Give the street and town"
            },
            {
              "kind": "phone",
              "value": "Give the phone number"
            }
          ],
          "hoursTitle": "",
          "hours": []
        }} />
      </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'Name the section'Text, up to 60 characters.
titlestring'Say how a visitor reaches you'Text, up to 100 characters.
titleSize'small' | 'display'-One of 'small', 'display'. Optional; empty is not rendered.
descriptionstring'Say in one line when you answer.'Text, up to 240 characters.
actions'header' | 'card'-One of 'header', 'card'. Optional; empty is not rendered.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
mediaMedia{…}See the type.
cardTitlestring'Name the place'Text, up to 60 characters.
lines{ kind, value, href }[]2 itemsList of up to 5. Each item: kind ('address' | 'phone' | 'email' | 'date' | 'time'), value, href (optional).
hoursTitlestring''Text, up to 60 characters.
hours{ day, time }[]0 itemsList of up to 6. Each item: day, time.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.