Booking, offset form


Install
npx shadcn add @klarhimmel/booking-offset-formDetailsAbout, 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
- 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.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the visitor can book here' | Text, up to 120 characters. |
description | string | 'Say in one or two sentences what ha…' | Text, up to 240 characters. |
media | Media | {…} | See the type. |
caption | string | 'Say in a line what the picture show…' | Text, up to 160 characters. |
fields | { kind, label, name, options, placeholder, hint, wide }[] | 3 items | List of 1 to 6. Each item: kind ('select' | 'text'), label, name (optional), options (optional), placeholder (optional), hint (optional), wide (optional). |
submit | string | 'Main action' | Text, up to 40 characters. |
secondary | Link | {…} | Optional; empty is not rendered. |
legal | string | 'Say in one line what the details ar…' | Text, up to 200 characters. |
action | string | '' | 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. |
captcha | boolean | - | Optional; empty is not rendered. |
captchaSitekey | string | - | Text, up to 100 characters. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |