The dates and the guests of a stay, handed to the place's own booking engine: a form that sends them to the engine's address as the parameters it reads (check-in, check-out, adults, children, and any fixed ones, such as the property's id), so a guest lands on the engine's page with the search filled in. Nothing is kept on the site: the engine holds the rooms, the prices and the payment. Without JavaScript it is a plain form that sends ISO dates. With it, the dates cannot start in the past, the check-out follows the check-in by the shortest stay, the nights are said as the dates change, and a date is rewritten for an engine that reads day first or month first.
Live demo
Live, from the library itself, at full size: scroll, hover, navigate away and back. The demo is never gated.
Measured
JavaScript of its own
934 B raw
575 B gzip.
Uses the shared runtime (1.9 kB raw, once per site). With those included: 2.6 kB raw.
CSS 5.6 kB raw including the base tokens. Measured from a production build, and again in CI for every change that can move it.
Browser support
Baseline · widely available
every browser. Elsewhere: nothing to fall back from.
Install Pro
The demo above is never gated; the source is. With a key in components.json (see account), the registry serves it like any other item:
The labels, the button, the nights line ({n}) and a note under it.
label
string
'Check availability'
The form's accessible name; a named form is a landmark, so two bars on one page take two names.
Theming and overrides
The section reads the theme contract (shadcn's variable names with the base tokens as fallback), so a pasted theme or one --ma-brand recolours it. Its class names are the override surface and stay stable; a named slot replaces the matching prop with your own markup.
Nothing in it moves; the button's hover fade is dropped.
With ClientRouter
Bound per form through the runtime; a fresh page binds again.
Why it is built this way
A GET form on purpose: what it sends is two dates and two numbers, no one's name, and a GET is what an engine's search page is built to read.
The script writes the minimum dates and the nights line; the form itself, its fields and its names are server-rendered, so a search works before the script loads.
An engine that reads 14/03/2030 gets it: the submit is taken over and the search sent as the engine's address with the two dates rewritten, every other field as it is.
Replaces: Hotel booking widgets embedded as an iframe. See the migration table.
Related
Contact · sample page
Write to the team.
Sample channels on the left. The form on the right is real and sends nothing here: fill it in and watch the button.
The first screen of a place to stay: the headline and a line of what the place is, a few facts, and the place by day and by night in one frame: light falling over the day picture (LightRays), the windows lit in the night one, and a pair of radios under them that picks which shows, with no script.
every browserloadclick
The rooms
Point at a room: its lamp comes on. Sample prices.
The rooms of a place to stay as cards: each drawn by RoomArt on a colour block, with its name, how many it sleeps, its beds and its size, what it has (a terrace, a bath, a sea view), a sentence about it and its price from a night, the whole card a link to book it or to its page.