Skip to content
Klarhimmel UI

Contact, pair of pictures

Contact, pair of pictures previewContact, pair of pictures preview

Install

npx shadcn add @klarhimmel/contact-pair-pictures
DetailsAbout, usage, props and more

Two pictures side by side on top, then a centred label, heading and line, a row of email and phone links, and two buttons beneath. No form. On a phone the pictures stack.

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-pair-pictures';
Also called
  • contact/pair-pictures
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 two photos, say of the team or the place, and keep the ask light: a centred line, an email and a phone link, and up to two buttons. For a form choose contact-form; for several channels as cards choose contact-channels.

Writing for it

- Title up to 120 characters, line up to 240, eyebrow up to 60; up to three contact links, each label up to 60 characters; kind is email or phone. - Exactly two pictures, shown 4 to 3, so crop faces and rooms with room to spare.

Watch out for

Two weak photos weigh as much as the heading does. Use two pictures of different things, not near copies, and leave a contact link blank rather than invent one.

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 ContactPairPictures from '@/components/klarhimmel/blocks/contact-pair-pictures';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactPairPictures props={{
          "pictures": [
            {
              "media": {
                "src": "/pictures/photo-wood3.avif",
                "alt": "A workbench with hand tools on the wall"
              }
            },
            {
              "media": {
                "src": "/pictures/photo-bakery1.avif",
                "alt": "A bakery counter with loaves and pastries behind glass"
              }
            }
          ],
          "eyebrow": "Name the topic",
          "title": "Say how to reach you",
          "description": "Say in one line who answers and how fast.",
          "contacts": [
            {
              "kind": "email",
              "label": "you@company.example",
              "href": "mailto:you@company.example"
            },
            {
              "kind": "phone",
              "label": "+00 00 000 00 00",
              "href": "tel:+000000000"
            }
          ],
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "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
pictures{ media }[]2 itemsList of 2 to 2. Each item: media.
eyebrowstring'Name the topic'Text, up to 60 characters.
titlestring'Say how to reach you'Text, up to 120 characters.
descriptionstring'Say in one line who answers and how…'Text, up to 240 characters.
contacts{ kind, label, href }[]2 itemsList of up to 3. Each item: kind ('email' | 'phone'), label, href.
primaryLink{…}See the type.
secondaryLink{…}Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.