Skip to content
Klarhimmel UI

Contact, banner and details

Contact, banner and details previewContact, banner and details preview

Install

npx shadcn add https://ui.klarhimmel.com/r/contact-banner-details.json
DetailsAbout, usage, props and more

A wide picture first, then a headline with actions and two detail blocks, an address with phone and email and a list of opening hours.

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-banner-details';
Also called
  • contact/banner-details
About
A wide picture first, then a headline with actions and two detail blocks, an address with phone and email and a list of opening hours. Centered stacks the intro over two cards; split puts the intro and details left and the actions right.
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 place people visit or call, when a wide picture should lead and the address, phone, email and opening hours follow as two clear blocks. Pick contact-map when a real map is the picture, and contact-offices when there are several places to list.

Writing for it

- Title up to 120 characters, description up to 240, caption up to 120, hours 1 to 8 rows with a day up to 30 and a time up to 40. - Set layout to centered for a full-width banner with two cards, or split for a contained banner with a caption and the actions on the right.

Watch out for

The banner needs a real wide picture, since it is cropped to a wide ratio. Keep the hours rows short so they stay on one line on a phone, and leave the caption empty in the centered layout, where it is not drawn.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactBannerDetails props={{
          "layout": "centered",
          "eyebrow": "Name a topic",
          "title": "Say how to reach or visit you",
          "description": "Say in one line what the visitor can do here.",
          "banner": {
            "src": "/pictures/photo-bike3.avif",
            "alt": "A bicycle in a workshop with tools on the wall behind"
          },
          "caption": "",
          "primary": {
            "label": "Main action",
            "href": "#book"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "more": {
            "label": "Another way in",
            "href": "#directions"
          },
          "contactTitle": "Name the contact block",
          "address": "Give the street address and town",
          "phone": "+00 00 00 00 00",
          "email": "you@company.example",
          "hoursTitle": "Name the hours block",
          "hoursNote": "Say in one line when the visitor can come.",
          "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
layout'centered' | 'split''centered'One of 'centered', 'split'. Optional; empty is not rendered.
eyebrowstring'Name a topic'Text, up to 60 characters.
titlestring'Say how to reach or visit you'Text, up to 120 characters.
descriptionstring'Say in one line what the visitor ca…'Text, up to 240 characters.
bannerMedia{…}See the type.
captionstring''Text, up to 120 characters. Optional; empty is not rendered.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
moreLink{…}Optional; empty is not rendered.
contactTitlestring'Name the contact block'Text, up to 60 characters.
addressstring'Give the street address and town'Text, up to 120 characters.
phonestring'+00 00 00 00 00'Text, up to 40 characters.
emailstring'you@company.example'Text, up to 80 characters.
hoursTitlestring'Name the hours block'Text, up to 60 characters.
hoursNotestring'Say in one line when the visitor ca…'Text, up to 160 characters. Optional; empty is not rendered.
hours{ day, time }[]3 itemsList of 1 to 8. Each item: day, time.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.