Skip to content

Attributes

Every attribute your site’s HTML may carry for the booking script, one table per job.

The script tag

One script on every page that shows a component or uses an attribute below. Its attributes are read once, when it loads.

<script src="https://link.tape-chart.com/widget/v1.js" data-property="YOUR_PROPERTY_NUMBER" defer></script>
AttributeGoes onValuesWhat it does
data-propertythe script tag9 digitsRequired. The property's public number. Without it the script draws nothing and logs a warning.
data-booking-paththe script taga path — default "/booking"The page of your site that carries the booking window. The search form, the book button, every data-pms-book link and bookUrl() lead there.
data-account-paththe script taga path — default "/account"The page of your site that carries the guest area. The account circle and the menu link there.
data-themethe script tag"light" | "dark" | "auto" | "page"The look the components start in. light or dark: that one. auto: the visitor's device. page: your site's own switch, followed live. Left out: light, unless the property's branding is dark. Except under page, a guest's pick on our theme icon wins.
data-localethe script tag"en" | "bg"The language of the components. Left out, they follow the page's own lang attribute, live. A guest's pick on our language icon wins over both.
data-consentthe script tag"granted" | "denied"Your site's decision about marketing tags, for a page with no consent-manager script. window.pmsBookingConsent wins over it.
data-analyticsthe script tag"off"off: measure nothing at all on this site — no session, no events, no tags.
data-assets-urlthe script taga URLWhere the room photographs are loaded from. Normally left out: the property says where.
data-base-urlthe script taga URL on the script's own originWhere the script calls our API. Honoured only when it is the origin the script itself was loaded from; anything else is ignored with a warning. Normally left out.

The ready components

A <div> with data-pms-booking becomes that component. A box added after the page loaded is drawn as it appears; one removed is taken down.

data-pms-bookingDrawsPage
"search-form"The search form: dates, guests and a search button.Search form
"window"The booking window: the whole booking flow.Booking window
"book-button"A button that links into the booking page.Book button
"offer"One stay's prices as a table.Offer prices
"portal"The guest area, in a frame of ours.Guest area
"menu"A circle that opens a menu: account link, language, currency, theme.Account
"account"A circle that links to the account page.Account
"theme"A light / dark switch.Theme icon
"language"An EN / BG switch.Language icon

Search form

Attributes on a box with data-pms-booking="search-form".

AttributeValuesWhat it does
data-title, data-subtitletext, up to 80 charactersYour own heading and the line under it, instead of ours.
data-ctatext, up to 80 charactersYour own words on the search button.
data-promo"off"off hides the promo-code field.

Booking window

Attributes on a box with data-pms-booking="window".

AttributeValuesWhat it does
data-credit"off"off hides the Tape Chart Link line under the component.

Book button

Attributes on a box with data-pms-booking="book-button".

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.

Offer prices

Attributes on a box with data-pms-booking="offer".

AttributeValuesWhat it does
data-check-in, data-check-outYYYY-MM-DDThe stay the table prices; check-out is the day of departure.
data-stay"tomorrow" | "weekend"Or a stay counted from the visitor's today. With neither, the table says it has no dates yet.
data-planrate plan idPrices of this rate plan only — a package; rooms the plan does not sell are left out. Left out: each room's lowest price.
data-rows"guests"guests: a row per party size of one room, instead of a row per room type. Needs data-room.
data-roomroom type idThe room a party-size table is about.
data-guests"2,3,4" — up to eight sizes of 1–20The party sizes of that table. Left out: 2, 3 and 4.
data-adults1–20 — default 2The party a room-type table is priced for.
data-child-agesages 0–17, comma-separatedThe children every row's party brings, one age per child: each price is asked with them, a per-person price counts them, and each row's link carries them. 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-per"person"person: the price divided by the party, instead of the total for the stay.
data-titletext, up to 80 charactersA heading above the table.

Guest area

Attributes on a box with data-pms-booking="portal".

AttributeValuesWhat it does
data-credit"off"off hides the Tape Chart Link line under the component.
data-scroll-offset0–400, in pxThe height of your sticky header. When the guest area brings itself into view it stops that far below the top of the screen.

Account

Attributes on a box with data-pms-booking="menu".

AttributeValuesWhat it does
data-hideany of "language currency theme"Rows left out of the menu, for a site that has its own switch for them.
data-system"off"off: the theme row is a light / dark switch, without the "as the device" choice.

A component’s look is not an attribute: the Styling page lists the CSS variables.

data-pms-book turns any element of yours into a way into the booking.

AttributeGoes onValuesWhat it does
data-pms-bookany element of yoursno valueMakes the element a way into the booking. An <a> gets its href; any other element goes there on click.
data-stayany element of yours"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-outany element of yoursYYYY-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-adultsany element of yours1–20 — default 2The number of adults the booking opens with.
data-child-agesany element of yoursages 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-roomany element of yoursroom type idOpens the booking on this room's rates.
data-planany element of yoursrate plan idTogether with data-room: with this rate plan chosen.

Values

data-pms-text prints one live value into an element of yours.

AttributeGoes onValuesWhat it does
data-pms-textany element of yoursa field name — see the lists belowReplaces the text of the element with one live value. What you wrote inside stays until the value arrives, and comes back whenever there is no value for the stay the element asks for now: the answer still on its way, a failed request, a room that cannot be sold.
data-rooman element with data-pms-textroom type idThe room the value belongs to. Needed for a room's value.
data-stayan element with data-pms-text"tomorrow" | "weekend" | "search"The stay the value is priced for. search: the dates and the party of the search form on the page — the form the element 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 value is priced once the search is complete — both dates, an age for every child — and the guest has stopped changing it; until then your own text stands.
data-check-in, data-check-outan element with data-pms-textYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-adultsan element with data-pms-text1–20 — default 2The party it is priced for.
data-child-agesan element with data-pms-textages 0–17, comma-separatedThe children it is priced for, 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-planan element with data-pms-textrate plan idThe price of this rate plan only. Left out: the room's lowest price.
data-formatan element with data-pms-text"long" | "short" | "numeric" | "weekday" | "iso"How a checkIn or checkOut value is written, in the page's language: long — 8 December; short — 8 Dec; weekday — Tuesday 8 December; numeric — the language's own digits form (08/12/2026 in English, 08.12.2026 г. in Bulgarian); iso — 2026-12-08. Left out: YYYY-MM-DD.

A value is priced again when one of its stay attributes changes while the page is open — data-stay, data-check-in, data-check-out, data-adults, data-child-ages, data-room, data-plan. A link’s address and a repeat’s cards follow the same way (a repeat also watches data-rooms).

Conditions

data-pms-if shows or hides an element of yours by a live answer: it sets and removes the hidden attribute.

AttributeGoes onValuesWhat it does
data-pms-ifany element of yours"available" | "scarce" | a field | field=text — with "!" in front for the oppositeShows the element when the test holds and hides it when it does not. available: with data-room, that room can be sold for the stay; with none, some room can. With data-room also scarce (1 to 3 left) and any field of a room — it holds when the field has a value. With no data-room, the fields of a stay. One comparison is allowed, equality: reasonKind=min-stay holds when the field prints exactly that text. With ! in front: the opposite of the whole test.
data-rooman element with data-pms-ifroom type idThe room the test is about. Left out: the test is about the stay as a whole.
data-stayan element with data-pms-if"tomorrow" | "weekend" | "search"The stay the test is asked for. search: the dates and the party of the search form on the page, chosen as for a value — until that search is complete the element stays as you wrote it.
data-check-in, data-check-outan element with data-pms-ifYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates asked for until the search is complete.
data-adultsan element with data-pms-if1–20 — default 2The party it is asked for.
data-child-agesan element with data-pms-ifages 0–17, comma-separatedThe children it is asked for, 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-planan element with data-pms-ifrate plan idAsks about this rate plan only: available means the room is sold on it.

It acts only on a definite answer. While the answer is on its way, when the request failed, when the search it follows is not complete, when data-room names a room the property does not list, or when the name is not a field (the console says so once), the element stays as you wrote it — so a “Sold out” line is never shown because of an error. Write hidden on what should appear only on a yes. A data-pms-text or data-pms-book inside the element uses its stay and party, its data-room and its data-plan, unless it names its own; one that names any of data-stay, data-check-in, data-check-out, data-adults or data-child-ages uses all of its own. Inside a rooms template data-pms-if works differently: see Repeats.

The comparison is exact, against what the field prints, with no quotes: reasonKind=min-stay, minStay=4; nights prints words, so nights=3 nights. A rule of your own stylesheet that sets display on the element wins over hidden — see the fix.

Repeats

A <template> repeated once per room type, and inside it a template per list of that room.

AttributeGoes onValuesWhat it does
data-pms-eachthe template"rooms"Repeats what is inside the template once per room type, right after the template.
data-staythe template"tomorrow" | "weekend" | "search"The stay the rooms are priced for. search: the dates and the party of the search form on the page, chosen as for a value; every bookUrl carries them. No card is drawn until the search is complete.
data-check-in, data-check-outthe templateYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-adultsthe template1–20 — default 2The party they are priced for.
data-child-agesthe templateages 0–17, comma-separatedThe children they are priced for, one age per child; every bookUrl carries them. 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-planthe templaterate plan idPrices of this rate plan only; rooms it does not sell are left out.
data-roomsthe templateroom type ids, comma-separatedOnly these rooms, in this order.
data-limitthe templatea whole number above 0At most this many rooms.
{{field}}inside the templatea room fieldReplaced by the room's value, in text and in attribute values; a name that is not a field is left as written. Never filled, braces left as you wrote them: an event handler (onclick and every other on…), style, srcdoc, and anything in a <script> or <style> element. An address (href, src, srcset, action, formaction, poster, data, ping) is filled, and removed if it would then be anything but a relative or http(s) address.
data-pms-ifinside the template"available" | "scarce" | a field | field=text — with "!" in front for the oppositeKeeps the element only when the room can be sold for the stay (available), when 1 to 3 are left (scarce), or when the named field has a value. One comparison is allowed, equality: reasonKind=min-stay holds when the field prints exactly that text. With ! in front: the opposite of the whole test. Inside a list, a field of that row counts too. Otherwise the element is left out — inside a template it is removed, not hidden.
data-pms-textinside the templatea room fieldFilled with that room's field; no data-room needed. A date honours data-format. An unknown field leaves your text.
data-pms-each="photos"a template inside the rooms templateRepeats over the room's photographs. The inner template is replaced by its rows.
data-pms-each="amenities"a template inside the rooms templateRepeats over the room's amenities.
data-pms-each="plans"a template inside the rooms templateRepeats over the room's rate plans — only the named one when the rooms template has data-plan.
data-limita template inside the rooms templatea whole number above 0At most this many rows of that list.

Every top-level element a repeat adds carries data-pms-item and data-pms-available — see State hooks. Inside a template data-pms-if removes an element; it does not set hidden there, and a kept element that you wrote hidden stays hidden.

The search form

Buttons of your own inside a <form> open our calendar and our guests panel; the picks land in the form’s own fields.

AttributeGoes onValuesWhat it does
data-pms-datesa button inside your formno value | "check-out"Opens our calendar when pressed. With the value check-out it opens on the check-out date.
data-pms-guestsa button inside your formno valueOpens our guests panel under the element.
data-monthsa button inside your form"1"Shows one month in the calendar instead of two, on screens from 768px. Any other value: two.
data-pms-textinside your forma search-form fieldPrints what the guest picked, in the page's language. Must sit inside the form.
data-formatinside your form"long" | "short" | "numeric" | "weekday" | "iso"The same five words for a checkIn or checkOut value of the form. Left out: Dec 08, 2026.
name="check_in"a field of your formYYYY-MM-DDThe arrival date. Written by the script when the guest picks; added as a hidden field when your form has none by this name.
name="check_out"a field of your formYYYY-MM-DDThe departure date. Written and added the same way.
name="adults"a field of your form1–20The number of adults. Your own field is read and written when you have one; else one is added hidden, starting at 2.
name="child_ages"a field of your formages 0–17, comma-separatedOne age per child. Added hidden, and left out of the address while there are no children.

State hooks

Attributes the script sets on your page so your CSS can react. Read them; do not write them.

AttributeGoes onValuesWhat it does
data-pms-ready<html>no valueSet once, when the script has bound the page for the first time. Never removed.
data-pms-has-datesyour formno valuePresent while both dates are set and check-out is after check-in.
data-pms-nightsyour formthe number of nightsThe number of nights, while both dates are set.
data-pms-openyour form"dates" | "guests"Which picker is open. Absent while none is.
data-pms-filledan element with data-pms-textno valuePresent while a value the script wrote stands in the element; never while your own text does. It is removed again when your own words come back.
data-pms-loadingany element of yoursno valuePresent on a value, a rooms template or an element with data-pms-if while its answer is on the way. Removed when the answer has landed or the request has failed.
data-pms-itemeach repeated itemno valueMarks every element a repeat added.
data-pms-availableeach repeated item"true" | "false"Whether that room can be sold for the stay: it has a rate plan for it that can be paid for online.
aria-expandeda button inside your form"true" | "false"true while that button's calendar or guests panel is open.
data-pms-fielda field of your formno valueMarks a hidden field the script added to your form.
data-pms-themeour boxes"light" | "dark"The look our components show now. Also on the element the calendar and the guests panel open in. Scope your dark variables to it.
data-pms-boundany element of yoursno valueThe script's own mark on an element it has wired. Leave it alone.

Our own boxes carry one more: data-pms-theme, light or dark, on every [data-pms-booking] box — it is what the dark selector matches.

The script also adds one element of its own to the end of your <body>: <div data-pms-booking-overlay>, one per page. The calendar, the guests panel and every list or dialog a component opens are drawn in it, it carries data-pms-theme too, and every ::part() rule is written on it. It is not a hook to write or to move — see How a part rule works.

Children

A child is priced by its real age, so a party with children is the adults plus one age per child: data-child-ages="6,9" beside data-adults, childAges: [6, 9] in rooms() and bookUrl(), child_ages=6,9 in an address.

Outside a search form a list counts only whole. On a link, a value, a rooms template, the box of a book button or an offer table, and in rooms() and bookUrl() there is no guest to correct it, so one bad entry drops the whole list and the party is the adults alone:

  • an entry that is not a whole number from 0 to 17 — a word, a fraction, and a null from a search event included;
  • more than eight ages;
  • an age the property books as an adult. Each property sets the highest age it still books as a child. A list with one older child is dropped whole, the younger children with it.

Nothing says that a list was dropped: there is no warning in the console and no flag in the answer of rooms(). The price you get is a real price, for the adults alone. And no method tells your code the property’s age limit: ask the hotel for it, and offer only ages up to it in a control of your own. Our guests panel already offers only those ages.

In a search form a guest picks each age in our guests panel. A child added there has no age until the guest picks one: pms-booking-search and getSearch() report it as null, the form’s child_ages field stays empty until every child has an age, and pressing Search opens the guests panel instead of leaving the page. setSearch() is more lenient than the list rule above: it drops the entries that are not whole numbers from 0 to 17 and keeps the rest.

Field names

What data-pms-text and {{…}} may print.

Fields of a room

For {{…}}, data-pms-if and data-pms-text in a rooms template, and for data-pms-text or data-pms-if together with data-room anywhere. The fields that say why a room cannot be sold — reasonKind, reason and the figures after them — are empty for a room on sale. vatAdded and cityTax are parts of price, never to be added to it.

FieldWhat it prints
nameThe room type's name, in the page's language.
descriptionIts description as the hotel wrote it. It may hold Markdown marks.
photoThe address of its first photograph. Empty when it has none.
amenitiesIts amenities' names, comma-separated.
areaIts size in m², as a number. Empty when not set.
maxGuestsThe most guests it takes.
leftHow many of this room are left for the stay. Empty when the room cannot be sold.
minStayThe minimum stay in nights — known only when the room is refused for this stay for being too short. Empty otherwise: a room on sale states none.
reasonKindWhy the room cannot be sold for the stay, as one word for your CSS and for data-pms-if: party (more guests than it takes), sold-out, closed, no-arrival, no-departure, min-stay, max-stay, stay-length, min-advance, max-advance, or other. Empty when it can be sold.
reasonThe same, as the sentence the booking window shows for it, in the page's language: Minimum stay 4 nights for these dates. Empty when the room can be sold.
maxStayThe maximum stay in nights — known only when the room is refused for this stay for being too long. Empty otherwise.
minAdvanceHow many days ahead the room must be booked — known only when it is refused for being booked too late. Empty otherwise.
maxAdvanceHow many days ahead at most the room can be booked — known only when it is refused for being booked too early. Empty otherwise.
stayLengthsThe only lengths of stay the room takes from this arrival, in nights, comma-separated: 3, 5, 7 — known only when it is refused for that. Empty otherwise.
priceThe price of the stay, formatted in the property's currency — the whole price the booking page charges: VAT and city tax charged on top of the room rate are already in it. Empty when the room cannot be sold.
pricePerNightThat price divided by the nights.
priceAmountThat price as a plain number in the property's currency: 306. Empty when the room cannot be sold. Do not convert it: the guest is charged in that currency.
vatAddedThe VAT charged on top of the room rate, formatted — on the rate plan the price is for. It is already inside price: never add it. Empty when the rate includes VAT.
cityTaxThe city tax collected on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes it or there is none.
taxesThe one line the booking window prints about taxes charged on top: VAT added · + €6.00 city tax. Empty when nothing is charged on top.
depositPercentThe percent of the booking that rate plan asks for at booking, as a number: 30. Empty when its deposit is not a percent — a fixed amount, a number of nights, or none.
currencyThe currency code: EUR.
nightsThe length of the stay in words: 2 nights.
checkInThe arrival date, YYYY-MM-DD — or as data-format says.
checkOutThe departure date, YYYY-MM-DD — or as data-format says.
checkInDayThe day of the month, with no leading zero: 8.
checkInMonthThe month's name: December.
checkInMonthShortThe month's short name: Dec.
checkInWeekdayThe weekday's name: Tuesday.
checkInYearThe year: 2026.
checkOutDayThe day of the month, with no leading zero: 8.
checkOutMonthThe month's name: December.
checkOutMonthShortThe month's short name: Dec.
checkOutWeekdayThe weekday's name: Tuesday.
checkOutYearThe year: 2026.
bookUrlThe address of your booking page with this stay and room — and the priced rate plan, when the room can be sold.
idThe room type's id.
roomIdThe room type's id — the same as id, and still the room's inside a list of plans.
roomNameThe room type's name — the same as name, and still the room's inside a list of plans.

Fields of a stay, with no room named

For data-pms-text and data-pms-if with no data-room. The stay is the one written on the element itself, or on the data-pms-if element it sits in; with data-stay="search" it is the search form’s. checkIn, checkOut and nights are printed only when one of the two names a stay.

FieldWhat it prints
fromPriceThe price of the stay in the cheapest room that can be sold, formatted: €102.00.
fromPricePerNightThat price divided by the nights.
checkInThe arrival date, YYYY-MM-DD — or as data-format says.
checkOutThe departure date, YYYY-MM-DD — or as data-format says.
nightsThe length of the stay in words: 2 nights.

Fields of a search form

For data-pms-text inside a form that has a data-pms-dates or data-pms-guests button — inside the form, not beside it. guests, adults and children stay as you wrote them until the guest changes the party.

FieldWhat it prints
checkInThe arrival date: Dec 08, 2026 — or as data-format says.
checkOutThe departure date, written the same way.
nightsThe length of the stay in words: 2 nights.
guestsThe whole party in words.
adultsThe adults in words.
childrenThe children in words.
checkInDayThe day of the month, with no leading zero: 8.
checkInMonthThe month's name: December.
checkInMonthShortThe month's short name: Dec.
checkInWeekdayThe weekday's name: Tuesday.
checkInYearThe year: 2026.
checkOutDayThe day of the month, with no leading zero: 8.
checkOutMonthThe month's name: December.
checkOutMonthShortThe month's short name: Dec.
checkOutWeekdayThe weekday's name: Tuesday.
checkOutYearThe year: 2026.

Fields of a photograph

Inside a template with data-pms-each="photos".

FieldWhat it prints
srcThe address of the photograph.
indexThe row's number in the list, from 1.

Fields of an amenity

Inside a template with data-pms-each="amenities".

FieldWhat it prints
labelThe amenity's name, in the page's language.
indexThe row's number in the list, from 1.

Fields of a rate plan

Inside a template with data-pms-each="plans". The room’s own fields stay readable there; a plan’s field of the same name wins. price is the whole price of the stay on that plan: vatAdded and cityTax are inside it.

FieldWhat it prints
nameThe rate plan's name.
descriptionThe plan's own description. Empty when it has none.
priceThe stay's price on this plan, formatted — the whole price the booking page charges, taxes charged on top included.
pricePerNightThat price divided by the nights.
priceAmountThat price as a plain number in the property's currency. Do not convert it.
depositWhat is paid at booking, formatted. Empty when the plan asks for nothing up front. When and how the rest is paid is in the plan's terms — do not state it yourself.
depositPercentThe percent of the booking the plan asks for at booking, as a number: 30. Empty when its deposit is not a percent.
vatAddedThe VAT charged on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes VAT.
cityTaxThe city tax collected on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes it or there is none.
taxesThe one line the booking window prints about taxes charged on top: VAT added · + €6.00 city tax. Empty when nothing is charged on top.
cancellationThe cancellation terms in one line — dated for this arrival when the engine dates them. Empty when the plan states none.
includesWhat the rate includes, the names joined with commas. Empty when it states none.
bookUrlThe address of your booking page with this stay, this room and this plan.
idThe rate plan's id.
indexThe row's number in the list, from 1.