Skip to content
Klarhimmel UI

Booking, offset form

Booking, offset form previewBooking, offset form preview

Install

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

A heading with label and lead at the top left, a picture with a caption stepping down to the right, and a booking form (selects and text fields, a main and a second…

Import

Import

import Block from '@/components/klarhimmel/blocks/booking-offset-form';
Also called
  • booking/offset-form
About
A heading with label and lead at the top left, a picture with a caption stepping down to the right, and a booking form (selects and text fields, a main and a second action, a legal line) stepping back to the left, in one diagonal flow.
Category
A way to ask for a time or a table: a short form beside what to expect. New project? Set it up once: /get-started/installation.

Notes

When to use it

Pick it when a booking page should read as a stepped path: the pitch at the top left, a picture stepping down to the right, then the form stepping back to the left. For a heading beside a form on one level use contact-form; when a card with price and time pills belongs in the page, use booking-pinned-header.

Writing for it

- The title holds 120 characters, the lead 240 and the caption 160. Say what the visitor books and what happens next. - Fields take one to six entries, each a select with up to 12 options or a text line; a label of 60 and a hint of 120. Mark one wide to span both columns. - The submit label holds 40 characters and the legal line 200; the second action is optional.

Watch out for

The picture is drawn at four to three, so a tall photo is cropped; choose one that keeps its subject in the middle. Keep the form to three fields or fewer, or the third step grows taller than the first two together.

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 BookingOffsetForm from '@/components/klarhimmel/blocks/booking-offset-form';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <BookingOffsetForm props={{
          "eyebrow": "Section name",
          "title": "Say what the visitor can book here",
          "description": "Say in one or two sentences what happens after the visitor books.",
          "media": {
            "src": "/pictures/photo-patio2.avif",
            "alt": "A curved paved path beside a stone wall"
          },
          "caption": "Say in a line what the picture shows.",
          "fields": [
            {
              "kind": "select",
              "label": "Name the first choice",
              "options": [
                "Say what this choice is"
              ],
              "placeholder": "",
              "hint": "Say what to pick here."
            },
            {
              "kind": "select",
              "label": "Name the second choice",
              "options": [
                "Say what this choice is"
              ],
              "placeholder": "",
              "hint": "Say what to pick here."
            },
            {
              "kind": "text",
              "label": "Name the third detail",
              "options": [],
              "placeholder": "",
              "hint": "Say what to write here.",
              "wide": true
            }
          ],
          "submit": "Main action",
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          },
          "legal": "Say in one line what the details are used for.",
          "action": ""
        }} />
      </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'Section name'Text, up to 60 characters.
titlestring'Say what the visitor can book here'Text, up to 120 characters.
descriptionstring'Say in one or two sentences what ha…'Text, up to 240 characters.
mediaMedia{…}See the type.
captionstring'Say in a line what the picture show…'Text, up to 160 characters.
fields{ kind, label, name, options, placeholder, hint, wide }[]3 itemsList of 1 to 6. Each item: kind ('select' | 'text'), label, name (optional), options (optional), placeholder (optional), hint (optional), wide (optional).
submitstring'Main action'Text, up to 40 characters.
secondaryLink{…}Optional; empty is not rendered.
legalstring'Say in one line what the details ar…'Text, up to 200 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.