Appearance · Customize
Make the tour feel like your product
Switch between light and dark tour themes and use a CSS custom property to match your own brand color.
Try it live
Loading the interactive example…
Make it yours
Download HTMLimport { createTour } from "sitetourkit";
import "sitetourkit/styles.css";
let tour;
const theme = document.querySelector("#theme");
const accent = document.querySelector("#accent");
const status = document.querySelector("#demo-status");
accent.oninput = () => document.documentElement.style.setProperty("--demo-accent", accent.value);
theme.onchange = () => tour?.setOptions({ theme: theme.value });
document.querySelector("#run-demo").onclick = async () => {
tour?.destroy();
tour = createTour({
theme: theme.value,
steps: [
{
target: "#theme-card",
title: "A tour that feels at home",
content: "The theme and accent come from the choices above. Reset to return to the defaults.",
},
],
});
status.textContent = "Your selected theme is active.";
await tour.start();
};
document.querySelector("#reset-demo").onclick = () => {
tour?.destroy();
theme.value = "light";
accent.value = "#17654b";
document.documentElement.style.removeProperty("--demo-accent");
status.textContent = "Theme reset. Choose a color, then run the example.";
};
window.addEventListener("pagehide", () => tour?.destroy());
Match your visual language
Choose Light, Dark or System, pick an accent color, then select Run example. The tooltip uses the selected theme while its accent is inherited from a CSS custom property. Reset restores the original choices.
The demo runs in its own frame, so its theme and color settings apply to the example interface.
Use options and CSS together
The theme option controls the tooltip's light, dark or system appearance. CSS custom properties handle brand details such as --tk-accent, spacing and corner radius. This example connects --tk-accent to a host variable named --demo-accent.
The complete HTML example includes that CSS rule. When copying the JavaScript or TypeScript into your app, add the matching rule to your own stylesheet.
Check the result in context
- Choose accent colors with sufficient contrast for buttons and text.
- Check the tooltip against the host page's actual light and dark surfaces.
- Keep keyboard focus visible after changing colors.
- Test longer labels and narrow mobile viewports.