Room to move
Tooltips flip and shift to fit. Late-loading targets can be awaited before the next step.
Add product tours and helpful hints to the interface you already have. A small JavaScript library, with no runtime dependencies.
npm install sitetourkit
TypeScript · ESM · CommonJS · Browser
Your workspace
A few useful things to get you moving.
Keep your layout.
Add a little guidance.
TourKit handles positioning, focus and the step lifecycle. You decide what deserves attention.
An SVG cutout draws attention around your target. Your element stays in its original place, including inside transformed containers.
Try the stacking-context example →Tooltips flip and shift to fit. Late-loading targets can be awaited before the next step.
Focus management, real buttons, screen reader announcements and reduced motion support.
Use it with plain JavaScript or your framework. Adjust the look with CSS custom properties.
Advance on a field change, wait for a successful action, or save progress for the next visit.
Six working examples, with code to copy and HTML to download.
Browse all six examples ↗A three-step introduction with a spotlight, progress and keyboard navigation.
↗ 02 / InteractionFollow a field change, validate the input and advance after a successful action.
↗ 03 / HintsLet users discover features at their own pace. Remember the tips they dismiss.
↗
Install sitetourkit, import the styles and describe your steps. Typed
options and events help you connect the tour to your application.
The optional migration adapter understands familiar options and data attributes.
import { createTour } from "sitetourkit";
import "sitetourkit/styles.css";
const tour = createTour({
progress: true,
steps: [
{
title: "Welcome",
content: "Let's take a quick look around.",
},
{
target: "#preview-metric",
title: "Your first tour",
content: "Start with a short introduction.",
placement: "bottom-start",
},
],
});
await tour.start();
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/sitetourkit@0.7.1/dist/styles.css" />
<script src="https://cdn.jsdelivr.net/npm/sitetourkit@0.7.1/dist/index.global.js"></script>
<!-- Declarative step -->
<button
data-tour-title="Saving"
data-tour="Click here to save your work."
data-tour-step="2"
>
Save
</button>
<script>
TourKit.createTour().start();
</script>
The playground covers hints, async targets, stacked layouts and tours that continue on another page.
Open source. MIT licensed. Yours to adapt.