Theme icon
A light / dark switch for every component on the page. Only for a site that has a dark look of its own.
- Box
data-pms-booking="theme"- Goes on
- Your header
- 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.
- Place the script once, on every page that shows a component — see Install the script.
- Paste the component where it should appear.
<div data-pms-booking="theme"></div>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="theme"></div>Settings
This component has no settings.
A guest’s pick is remembered in their browser and fires pms-booking-theme on window.
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
Your site has its own theme switch: leave this icon out and let the site decide. Every component repaints at once, with no reload, and our frames are told in the same moment — no refresh() is needed for a switch between light and dark. What a switch of look still changes when your stylesheet sets every colour itself: When every colour is set.
Your site marks dark on <html>
With data-theme="page" on the script the components are dark whenever <html> or <body> carries class="dark", or data-theme, data-mode or data-color-scheme set to dark. They follow it live.
<script src="https://link.tape-chart.com/widget/v1.js" data-property="YOUR_PROPERTY_NUMBER" data-theme="page" defer></script>| Attribute | Values | What it does |
|---|---|---|
data-property | 9 digits | Required. The property's public number. Without it the script draws nothing and logs a warning. |
data-theme | "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. |
Anything else
Call this from your own switch. It is not remembered: your site remembers its own choice.
window.pmsBooking.setTheme('dark'); // or 'light'Every attribute, method and variable: Attributes · JavaScript · Styling.