---
title: "Booking Form"
description: "Collects a service selection, available slot, and customer details - radio cards, a native date, time chips and the contact fields."
slug: "booking-form"
---

import { DocPage, PageHeader, SkillPanel, SourceFiles, DocLink, SkillField, SkillText, SkillRow, ApiPill } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="booking-form" title="Booking Form" component="booking-form">
  Collects a service selection, available slot, and customer details - radio cards, a native date, time chips and the contact fields. Part of the <DocLink href="website-events-promotions.html">Events & Promotions</DocLink> blocks.
</PageHeader>

<SkillPanel component="booking-form">
  <SkillField label="Native basis">
<SkillText>A <code>&lt;form&gt;</code>: services as radio cards, an <code>&lt;input type="date"&gt;</code>, time slots as radio chips (booked ones <code>disabled</code>), contact Inputs and a summary with the submit Button.</SkillText>
  </SkillField>

  <SkillField label="Built from">
<SkillText><DocLink href="radio.html">Radio</DocLink>, <DocLink href="input.html">Input</DocLink>, <DocLink href="label.html">Label</DocLink>, <DocLink href="textarea.html">Textarea</DocLink>, <DocLink href="button.html">Button</DocLink>.</SkillText>
  </SkillField>

  <SkillField label="Web Platform APIs">
<SkillRow>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset" title="grouped controls with a legend"><code>&lt;fieldset&gt;</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/CSS/:has" title="parent styles react to a checked input or a state inside"><code>:has()</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date" title="a native date picker"><code>&lt;input type="date"&gt;</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation" title="required, type and pattern - the browser checks the form"><code>Constraint validation</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete" title="the browser fills known fields"><code>autocomplete</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries" title="the layout follows the block width, not the viewport"><code>Container queries</code></ApiPill>
  </SkillRow>
  </SkillField>

  <SkillField label="Classes">
<SkillRow>
    <code>.mk-booking-form</code>
    <code>.mk-booking-form-group</code>
    <code>.mk-booking-form-options</code>
    <code>.mk-booking-form-option</code>
    <code>.mk-booking-form-slots</code>
    <code>.mk-booking-form-slot</code>
    <code>.mk-booking-form-tz</code>
    <code>.mk-booking-form-fields</code>
    <code>.mk-booking-form-field</code>
    <code>.mk-booking-form-summary</code>
    <code>.mk-booking-form-layout</code>
  </SkillRow>
  </SkillField>

  <SkillField label="Data attributes">
<SkillText><code>data-variant="compact"</code>.</SkillText>
  </SkillField>
</SkillPanel>

```html example label="Default" hint="Services as radio cards (:has(:checked) highlights the choice), a native date input, time chips - booked slots are disabled - then the contact fields and a summary. Choices left, details right from 52rem." previewStyle="align-items:stretch;"
<section class="mk-booking-form" aria-labelledby="bk-title">
  <h2 id="bk-title" class="sr-only">Book an appointment</h2>
  <form action="#" method="post">
    <div class="mk-booking-form-layout">
      <div style="display: grid; gap: 2rem">
        <fieldset class="mk-booking-form-group">
          <legend>1. Choose a service</legend>
          <div class="mk-booking-form-options">
            <label class="mk-booking-form-option" for="bk-intro"
              ><input class="radio" type="radio" name="service" id="bk-intro" value="bk-intro" checked required /><span
                ><strong>Intro call</strong><small>20 min · video</small></span
              ><b>Free</b></label
            >
            <label class="mk-booking-form-option" for="bk-workshop"
              ><input class="radio" type="radio" name="service" id="bk-workshop" value="bk-workshop" required /><span
                ><strong>Team workshop</strong><small>90 min · on site or video</small></span
              ><b>€240</b></label
            >
            <label class="mk-booking-form-option" for="bk-review"
              ><input class="radio" type="radio" name="service" id="bk-review" value="bk-review" required /><span
                ><strong>Workspace review</strong><small>45 min · video</small></span
              ><b>€90</b></label
            >
          </div>
        </fieldset>
        <fieldset class="mk-booking-form-group">
          <legend>2. Pick a date and time</legend>
          <div class="mk-booking-form-field"
            ><label class="label" for="bk-date">Date</label
            ><input class="input" type="date" id="bk-date" name="date" min="2026-10-02" value="2026-10-06" required
          /></div>
          <div class="mk-booking-form-slots" role="group" aria-label="Available times">
            <label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="09:00" required /><span>09:00</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="09:30" disabled required /><span>09:30</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="10:00" checked required /><span>10:00</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="11:30" required /><span>11:30</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="13:00" disabled required /><span>13:00</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="14:30" required /><span>14:30</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="16:00" required /><span>16:00</span></label
            ><label class="mk-booking-form-slot"
              ><input type="radio" name="slot" value="16:30" disabled required /><span>16:30</span></label
            >
          </div>
          <span class="mk-booking-form-tz">Times in Lisbon time (WEST, UTC+1)</span>
        </fieldset>
      </div>
      <div style="display: grid; gap: 2rem; align-content: start">
        <fieldset class="mk-booking-form-group">
          <legend>3. Your details</legend>
          <div class="mk-booking-form-fields">
            <div class="mk-booking-form-field"
              ><label class="label" for="bk-name">Name</label
              ><input class="input" id="bk-name" name="name" autocomplete="name" required
            /></div>
            <div class="mk-booking-form-field"
              ><label class="label" for="bk-email">Email</label
              ><input class="input" id="bk-email" type="email" name="email" autocomplete="email" required
            /></div>
            <div class="mk-booking-form-field" data-span="full"
              ><label class="label" for="bk-notes">Anything we should know?</label><textarea class="textarea" id="bk-notes" name="notes" rows="3"></textarea>
            </div>
          </div>
        </fieldset>
        <div class="mk-booking-form-summary">
          <p>You can change or cancel up to 24 hours before. We send a calendar invite right away.</p>
          <button class="btn" type="submit">Confirm booking</button>
        </div>
      </div>
    </div>
  </form>
</section>
```

```html example label="Compact" hint="data-variant='compact': one column on a card - for a sidebar or a product page." previewStyle="align-items:stretch;"
<section class="mk-booking-form" data-variant="compact" aria-labelledby="bk2-title">
  <form action="#" method="post">
    <fieldset class="mk-booking-form-group">
      <legend id="bk2-title">Book a table · Tomorrow</legend>
      <div class="mk-booking-form-slots" role="group" aria-label="Available times">
        <label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="18:00" required /><span>18:00</span></label
        ><label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="18:30" disabled required /><span>18:30</span></label
        ><label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="19:00" checked required /><span>19:00</span></label
        ><label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="19:30" required /><span>19:30</span></label
        ><label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="20:00" disabled required /><span>20:00</span></label
        ><label class="mk-booking-form-slot"
          ><input type="radio" name="slot" value="21:00" required /><span>21:00</span></label
        >
      </div>
    </fieldset>
    <div class="mk-booking-form-fields">
      <div class="mk-booking-form-field"
        ><label class="label" for="bk2-guests">Guests</label
        ><input class="input" type="number" id="bk2-guests" name="guests" min="1" max="8" value="2" inputmode="numeric"
      /></div>
      <div class="mk-booking-form-field"
        ><label class="label" for="bk2-phone">Phone</label
        ><input class="input" type="tel" id="bk2-phone" name="phone" autocomplete="tel" required
      /></div>
    </div>
    <button class="btn" type="submit">Reserve</button>
  </form>
</section>
```

<SourceFiles component="booking-form" section="css" />

</DocPage>
