Skip to content
Klarhimmel UI

Contact, banner and form card

Contact, banner and form card previewContact, banner and form card preview

Install

npx shadcn add @klarhimmel/contact-banner-form
DetailsAbout, usage, props and more

A wide picture band across the top, then the label, heading, lead, a paragraph, labelled details in two columns and a row of links on the left, and on the right a card…

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-banner-form';
Also called
  • contact/banner-form
About
A wide picture band across the top, then the label, heading, lead, a paragraph, labelled details in two columns and a row of links on the left, and on the right a card with a one-field form and two buttons under it.
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 page opens on a wide picture and the visitor should either read the details or send one short request from a card beside them. For a longer message form with name and email choose contact-form; for a form laid over the picture choose contact-overlay-aside.

Writing for it

- Title up to 100 characters, lead up to 240, paragraph up to 300. - Up to four details, each a label up to 30 characters and a value up to 80. - One field with a label up to 60 characters, a send label up to 40, and up to two buttons under the card.

Watch out for

The picture band is about 30 rem tall at wide widths, so give it a photo with a calm lower half. The card asks for one thing only; a second field belongs in contact-form.

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

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactBannerForm props={{
          "banner": {
            "src": "/pictures/photo-brk1.avif",
            "alt": "A breakfast plate of fruit with orange juice"
          },
          "eyebrow": "Name the section",
          "title": "Say how a visitor reaches you",
          "description": "Say in one or two sentences when you answer.",
          "body": "Say in a sentence what to bring up first.",
          "details": [
            {
              "label": "Address",
              "value": "Give the street and town"
            },
            {
              "label": "Email",
              "value": "Give the email address"
            },
            {
              "label": "Phone",
              "value": "Give the phone number"
            }
          ],
          "fieldLabel": "Name the one thing you ask for",
          "fieldHelp": "Say in a few words how the answer is used.",
          "submit": "Send"
        }} />
      </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
bannerMedia{…}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.
bodystring'Say in a sentence what to bring up …'Text, up to 300 characters.
details{ label, value, href }[]3 itemsList of up to 4. Each item: label, value, href (optional).
textLinkLink-Optional; empty is not rendered.
profileLink-Optional; empty is not rendered.
fieldLabelstring'Name the one thing you ask for'Text, up to 60 characters.
fieldNamestring-Text, up to 40 characters. Optional; empty is not rendered.
fieldPlaceholderstring-Text, up to 80 characters. Optional; empty is not rendered.
fieldHelpstring'Say in a few words how the answer i…'Text, up to 120 characters.
submitstring'Send'Text, up to 40 characters.
primaryLink-Optional; empty is not rendered.
secondaryLink-Optional; empty is not rendered.
actionstring-Text, up to 300 characters. Optional; empty is not rendered.
method'post' | 'get'-One of 'post', 'get'. Optional; empty is not rendered.
hidden{ }-Optional; empty is not rendered.
captchaboolean-Optional; empty is not rendered.
captchaSitekeystring-Text, up to 100 characters. Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.