Skip to content
Klarhimmel UI

Contact, split with details

Contact, split with details previewContact, split with details preview

Install

npx shadcn add @klarhimmel/contact-split-details
DetailsAbout, usage, props and more

The label, heading, lead and two buttons at the start beside a captioned picture, then under a thin rule two plain columns: the address, phone and email, and the…

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-split-details';
Also called
  • contact/split-details
About
The label, heading, lead and two buttons at the start beside a captioned picture, then under a thin rule two plain columns: the address, phone and email, and the opening hours with the day beside its time. On a phone everything stacks.
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 for a calm contact section: text and two buttons beside a captioned picture, with the address and opening hours as plain columns below a rule. For cards under a banner picture choose contact-banner-details.

Writing for it

- Title up to 100 characters, lead up to 240, caption up to 160. - Address up to 120 characters, phone up to 40, email up to 80. - One to seven hours rows, each a day up to 30 characters and a time up to 40.

Watch out for

The hours read best with short day labels such as Mon to Fri; a long day name pushes the time across the column.

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 ContactSplitDetails from '@/components/klarhimmel/blocks/contact-split-details';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactSplitDetails 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-clean1.avif",
            "alt": "A bright white kitchen with a marble island"
          },
          "caption": "Say what the picture shows.",
          "contactTitle": "Name the contact block",
          "address": "Give the street and town",
          "phone": "Give the phone number",
          "email": "Give the email address",
          "hoursTitle": "Name the hours block",
          "hours": [
            {
              "day": "Name the days",
              "time": "Name the times"
            },
            {
              "day": "Name the days",
              "time": "Name the times"
            },
            {
              "day": "Name the days",
              "time": "Name the times"
            }
          ]
        }} />
      </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.
descriptionstring'Say in one line when you answer.'Text, up to 240 characters.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
mediaMedia{…}See the type.
captionstring'Say what the picture shows.'Text, up to 160 characters.
contactTitlestring'Name the contact block'Text, up to 60 characters.
addressstring'Give the street and town'Text, up to 120 characters.
phonestring'Give the phone number'Text, up to 40 characters.
emailstring'Give the email address'Text, up to 80 characters.
hoursTitlestring'Name the hours block'Text, up to 60 characters.
hours{ day, time }[]3 itemsList of 1 to 7. Each item: day, time.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.