Skip to content
Klarhimmel UI

Contact, overlap card

Contact, overlap card previewContact, overlap card preview

Install

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

A large picture across seven of twelve columns with a card overlapping its right edge, holding a label, heading, lead, address, phone and email lines, two buttons and a…

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-overlap-card';
Also called
  • contact/overlap-card
About
A large picture across seven of twelve columns with a card overlapping its right edge, holding a label, heading, lead, address, phone and email lines, two buttons and a quiet third link.
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 a contact section should lead with a real picture and put the ways to reach you on a card that laps over the picture's edge. For a plain details column beside a form pick contact-form; for a map with details pick contact-map.

Writing for it

- Heading up to 100 characters, lead up to 240, label up to 60. - One to five contact lines of up to 80 characters, each marked address, phone or email, with an optional link. - One main button, an optional second button and an optional quiet link.

Watch out for

The card needs a picture that still reads when its right fifth is covered, so keep the subject left of centre. Long addresses wrap inside the card, so write them 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 ContactOverlapCard from '@/components/klarhimmel/blocks/contact-overlap-card';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactOverlapCard props={{
          "media": {
            "src": "/pictures/photo-lily1.avif",
            "alt": "A white lily in soft light"
          },
          "eyebrow": "Name the section",
          "title": "Say how a visitor reaches you",
          "description": "Say in one or two sentences when you answer and what to bring up first.",
          "lines": [
            {
              "kind": "address",
              "value": "Give the street and town",
              "href": "#map"
            },
            {
              "kind": "phone",
              "value": "Give the phone number",
              "href": "#phone"
            },
            {
              "kind": "email",
              "value": "Give the email address",
              "href": "#email"
            }
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "textLink": {
            "label": "Name the extra page",
            "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 how a visitor reaches you'Text, up to 100 characters.
descriptionstring'Say in one or two sentences when yo…'Text, up to 240 characters.
lines{ kind, value, href }[]3 itemsList of 1 to 5. Each item: kind ('address' | 'phone' | 'email'), value, href (optional).
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
textLinkLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.