Skip to content
Klarhimmel UI

Contact, booking

Contact, booking previewContact, booking preview

Install

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

Contact options beside a card of static time slots to pick from, the name and email of who is booking, and a confirm button.

Import

Import

import Block from '@/components/klarhimmel/blocks/contact-booking';
Also called
  • contact/booking
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

Contact options on the left and a card of fixed time slots with a confirm button on the right. The slots are static text you write; for a real calendar use contact-booking-link instead.

Writing for it

- Slots take one to eight entries of up to 30 characters, such as 'Tue 10:00'. Write them in one consistent format so the grid of buttons lines up. - Options (one to three) each have a label (40), a description (140) and a link. Use them for the other ways in, such as a phone line for people who dislike forms. - The slotsTitle (60) is the legend of the radio group. Phrase it as a question, like 'When suits you?'.

Watch out for

Confirm stays disabled until a slot is picked, and the choice is only a radio value named 'slot'; the block checks no availability, so expired slots must be removed by hand. A host has to wire the submit.

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 ContactBooking from '@/components/klarhimmel/blocks/contact-booking';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContactBooking props={{
          "eyebrow": "Name the section",
          "title": "Say what the call is",
          "description": "Say in one sentence how long the call takes and what it settles. Say they can pick a time.",
          "options": [
            {
              "label": "First way",
              "description": "Give the address or number and say how fast you reply.",
              "link": {
                "label": "Main action",
                "href": "mailto:hello@yourcompany.example"
              }
            },
            {
              "label": "Second way",
              "description": "Say what they find there, in one line.",
              "link": {
                "label": "Second action",
                "href": "#help"
              }
            }
          ],
          "slotsTitle": "Say to pick a time",
          "slots": [
            "Day 00:00",
            "Day 00:00",
            "Day 00:00",
            "Day 00:00",
            "Day 00:00",
            "Day 00:00"
          ],
          "nameLabel": "Full name",
          "emailLabel": "Your email",
          "submit": "Confirm"
        }} />
      </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 what the call is'Text, up to 120 characters.
descriptionstring'Say in one sentence how long the ca…'Text, up to 300 characters.
options{ label, description, link }[]2 itemsList of 1 to 3. Each item: label, description, link.
choiceLabelstring-Text, up to 60 characters. Optional; empty is not rendered.
choicesstring[]-List of up to 8. Optional; empty is not rendered.
slotsTitlestring'Say to pick a time'Text, up to 60 characters.
slotsstring[]6 itemsList of 1 to 8.
nameLabelstring'Full name'Text, up to 40 characters. Optional; empty is not rendered.
emailLabelstring'Your email'Text, up to 40 characters. Optional; empty is not rendered.
phoneLabelstring-Text, up to 40 characters. Optional; empty is not rendered.
submitstring'Confirm'Text, up to 30 characters.
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.