UI DeployDesign languages Themes For agents llms.txt

Warm Editorial — forms

Booking Form Panel

Asymmetric two-column layout: fields on the left, a sticky summary on the right that updates as the form is filled. Inputs are soft-cornered rather than pills, because a pill text field is unreadable at length.

Open preview
Theme
Warm Editorial
Category
forms
JavaScript
18 lines, no dependencies
Breakpoint
900px
Min width
320px

Paste this into Claude, Cursor or Copilot — or point the agent at https://ui-deploy.com/r/warm-editorial/form-panel/prompt.md

# Booking Form Panel — Warm Editorial

Paste this whole file into Claude, Cursor or Copilot.

---

## What to build

An asymmetric two-column booking form: fields on the left in a
`minmax(0,1fr) 370px` grid, and on the right a **sticky summary panel** that
updates live as the form is filled.

Fields are grouped in `<fieldset>` blocks with a quiet `<legend>`. Below 900px the
summary moves above the form (`order:-1`) and stops being sticky.

---

## Tokens

```css
:root{
  --bg2:#F6F3ED; --bg3:#E4DED2; --border:#DAD3C6; --border2:#C6BDAC;
  --text:#22201D; --text2:#5C574F; --text3:#8C857A;
  --accent:#A38A6A; --accent-text:#7D6644; --accent-s:rgba(163,138,106,.12);
  --radius:28px; --radius-sm:12px; --radius-pill:999px;
  --font-display:'Inter Tight',system-ui,sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);
}
[data-theme="dark"]{
  --bg2:#1E1A17; --bg3:#262119; --border:#2E2822; --border2:#40382F;
  --text:#EDE7DD; --text2:#A79E92; --text3:#8A8177;
  --accent:#B39B7C; --accent-text:#C0A888; --accent-s:rgba(179,155,124,.13);
}
```

---

## Rules — these are not preferences

1. **Inputs are soft-cornered (12px), not pills.** Everything else in this language
   is a 999px pill; text fields are the deliberate exception. A pill text input is
   unreadable the moment the value is longer than a word.
2. **Every field has a real `<label for>`.** A placeholder is not a label — it
   disappears exactly when the user needs it.
3. **State "required" in words, not colour.** A red asterisk alone fails anyone who
   cannot see the red.
4. **The focus ring is `border-color:var(--accent)` plus
   `box-shadow:0 0 0 3px var(--accent-s)`** — and set `outline:none` only because a
   visible ring is already being drawn. Never remove the ring without replacing it.
5. **Set `min-width:0` on grid children.** Without it a long value or a `<select>`
   forces the column wider than the grid and the layout scrolls sideways. This is
   the most common bug in this component.
6. **Summary values need `overflow-wrap:anywhere`.** A long email address will
   otherwise push the panel out of the card.
7. **`position:sticky` comes off below 900px.** A sticky panel on a phone eats the
   viewport.
8. Buttons stay pills, 52px. Icons inline SVG only, no emoji.

---

## Adapting it

- **Multi-step flow** — keep the summary panel and swap the fieldsets. The panel is
  what makes a stepped form tolerable; do not drop it to save space.
- **Server validation** — render the error under the field in `--text2` with a
  bronze left border, and set `aria-describedby` and `aria-invalid` on the input.
- **Do not format currency in the input handler.** Format server-side and write the
  finished string in.

---

## Reference implementation

See `code.html` — 18 lines of dependency-free JS.

Booking Form Panel — Warm Editorial

Paste this whole file into Claude, Cursor or Copilot.


What to build

An asymmetric two-column booking form: fields on the left in a minmax(0,1fr) 370px grid, and on the right a sticky summary panel that updates live as the form is filled.

Fields are grouped in <fieldset> blocks with a quiet <legend>. Below 900px the summary moves above the form (order:-1) and stops being sticky.


Tokens

:root{
  --bg2:#F6F3ED; --bg3:#E4DED2; --border:#DAD3C6; --border2:#C6BDAC;
  --text:#22201D; --text2:#5C574F; --text3:#8C857A;
  --accent:#A38A6A; --accent-text:#7D6644; --accent-s:rgba(163,138,106,.12);
  --radius:28px; --radius-sm:12px; --radius-pill:999px;
  --font-display:'Inter Tight',system-ui,sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);
}
[data-theme="dark"]{
  --bg2:#1E1A17; --bg3:#262119; --border:#2E2822; --border2:#40382F;
  --text:#EDE7DD; --text2:#A79E92; --text3:#8A8177;
  --accent:#B39B7C; --accent-text:#C0A888; --accent-s:rgba(179,155,124,.13);
}

Rules — these are not preferences

  1. Inputs are soft-cornered (12px), not pills. Everything else in this language is a 999px pill; text fields are the deliberate exception. A pill text input is unreadable the moment the value is longer than a word.
  2. Every field has a real <label for>. A placeholder is not a label — it disappears exactly when the user needs it.
  3. State "required" in words, not colour. A red asterisk alone fails anyone who cannot see the red.
  4. **The focus ring is border-color:var(--accent) plus box-shadow:0 0 0 3px var(--accent-s)** — and set outline:none only because a visible ring is already being drawn. Never remove the ring without replacing it.
  5. Set min-width:0 on grid children. Without it a long value or a <select> forces the column wider than the grid and the layout scrolls sideways. This is the most common bug in this component.
  6. Summary values need overflow-wrap:anywhere. A long email address will otherwise push the panel out of the card.
  7. position:sticky comes off below 900px. A sticky panel on a phone eats the viewport.
  8. Buttons stay pills, 52px. Icons inline SVG only, no emoji.

Adapting it

  • Multi-step flow — keep the summary panel and swap the fieldsets. The panel is

what makes a stepped form tolerable; do not drop it to save space.

  • Server validation — render the error under the field in --text2 with a

bronze left border, and set aria-describedby and aria-invalid on the input.

  • Do not format currency in the input handler. Format server-side and write the

finished string in.


Reference implementation

See code.html — 18 lines of dependency-free JS.