Booking, alternating rows


Install
npx shadcn add @klarhimmel/booking-alternating-rowsDetailsAbout, usage, props and more
A centred heading over rows in cards, each a picture beside text with the picture alternating sides.
Import
Import
- booking/alternating-rows
- About
- A centred heading over rows in cards, each a picture beside text with the picture alternating sides. A row can be an event with points, time and place and buttons, an offer with a tag, price and button, or a small form.
- 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 visitor can book different kinds of things, shown as cards with a picture alternating sides: an event with its points and buttons, an offer with a price, or a small form. For one booking form choose booking-offset-form.
Writing for it
- Title up to 100 characters, lead up to 240; one to five rows, each with a heading up to 80 characters and any of: a date line, a tag, points up to 80 characters, a time and place, a price, up to three form fields, up to two buttons and a quiet link. - Give a form row a send label, or its fields are not drawn.
Watch out for
Rows that mix an event, an offer and a form read best when each has one clear purpose. A row with more than a form or a button pair gets tall; split it into two rows.
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 | 'Name the section' | Text, up to 60 characters. |
title | string | 'Say what a visitor can book' | Text, up to 100 characters. |
description | string | 'Say in one line how booking works.' | Text, up to 240 characters. |
rows | { media, caption, rating, eyebrow, tag, title, name, description, points, when, | 3 items | List of 1 to 5. Each item: media, caption, rating (optional), eyebrow (optional), tag (optional), title, name (optional), description, points (optional), when (optional), where (optional), price (optional), priceNote (optional), fields (optional), submit (optional), legal (optional), primary (optional), secondary (optional), textLink (optional). |
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. |