Skip to content

Book button

A link into your booking page, for a banner, a room page or an offer.

Box
data-pms-booking="book-button"
Goes on
Any page
Drawn
On your page, in a shadow root
Own HTML instead
Yes — recommended

The ready component

One line to paste. It wears the property’s branding from the PMS until your site’s stylesheet says otherwise.

  1. Place the script once, on every page that shows a component — see Install the script.
  2. Paste the component where it should appear.

Live preview on a sample hotel — invented rooms and prices, placeholder pictures. Open in a new tab

The live preview runs only when these docs are opened on a developer's own machine.

<div data-pms-booking="book-button"></div>

Settings

What the component shows and where it leads — attributes on its box.

AttributeValuesWhat it does
data-labeltext, up to 60 charactersThe button's words. Left out: Book now, in the page's language.
data-roomroom type idOpens the booking on this room's rates instead of the room list.
data-planrate plan idTogether with data-room: opens the booking with this rate plan chosen.
data-stay"tomorrow" | "weekend"A stay counted from the visitor's today. tomorrow: one night from tomorrow. weekend: the coming Friday to Sunday — on a Saturday, that Saturday to Sunday.
data-check-in, data-check-outYYYY-MM-DDExactly these dates; check-out is the day of departure. Both are needed, in order. They win over data-stay.
data-adults1–20 — default 2The number of adults the booking opens with.
data-child-agesages 0–17, comma-separatedThe children the booking opens with, one age per child. The list counts only whole: with an entry that is not a whole number from 0 to 17, with more than eight ages, or with a child the property books as an adult, it is ignored and the party is the adults alone.

How it looks — colours, corners, fonts — is not an attribute. Your site’s stylesheet sets it with CSS variables: see Styling.

With your own HTML

Recommended. Any link or button of yours becomes a way into the booking: the script fills in the address.

data-pms-book on any element of yours. A link gets its address when the page loads; any other element goes there on click, with the dates counted at that moment. A named stay — tomorrow, weekend — is counted from the visitor’s today, so it never goes stale. With data-stay="search" the link carries the dates and the party of the search form on the page, and its address follows every pick; while the search is not complete it carries no dates — see Prices that follow your search form. Keep an href of your own as the fallback.

<a class="book-now" href="/booking" data-pms-book data-stay="weekend">Book this weekend</a>
<a class="book-now" href="/booking" data-pms-book
data-room="00000000-0000-0000-0000-000000000000"
data-check-in="2026-12-24" data-check-out="2026-12-27" data-adults="2" data-child-ages="6,9">
Christmas in this room, two adults and two children
</a>
<button class="book-now" data-pms-book data-room="00000000-0000-0000-0000-000000000000">Book this room</button>
AttributeValuesWhat it does
data-pms-bookno valueMakes the element a way into the booking. An <a> gets its href; any other element goes there on click.
data-stay"tomorrow" | "weekend" | "search"A stay counted from the visitor's today. tomorrow: one night from tomorrow. weekend: the coming Friday to Sunday — on a Saturday, that Saturday to Sunday. search: the dates and the party of the search form on the page — the form the link is inside, else the page's first form with a data-pms-dates or data-pms-guests button, else its first ready search form. The address follows every pick; while the search is not complete it carries no dates.
data-check-in, data-check-outYYYY-MM-DDExactly these dates; check-out is the day of departure. Both are needed, in order. They win over data-stay — except with data-stay="search", where they stand only until the search is complete.
data-adults1–20 — default 2The number of adults the booking opens with.
data-child-agesages 0–17, comma-separatedThe children the booking opens with, one age per child. The list counts only whole: with an entry that is not a whole number from 0 to 17, with more than eight ages, or with a child the property books as an adult, it is ignored and the party is the adults alone.
data-roomroom type idOpens the booking on this room's rates.
data-planrate plan idTogether with data-room: with this rate plan chosen.

With no stay the link opens your booking page as it is. data-plan is used only together with data-room.

With fixed dates, no attribute at all

A plain link to your booking page with the search in its address lands searched.

HTML
<a class="book-now" href="/booking?check_in=2026-12-24&check_out=2026-12-27&adults=2">Book Christmas</a>

Room type and rate plan ids

data-room, data-rooms and data-plan take the property’s own ids. An id does not change when a name does. The hotel finds them in Tape Chart Link, under Booking engine → Components, on this component’s page; the snippets here show 00000000-0000-0000-0000-000000000000 in their place.

Every attribute, method and variable: Attributes · JavaScript · Styling.