On this page
@inklu/tour
Updated October 2026
@inklu/tour runs product tours in React. It finds each step's target, positions a card against it, cuts a spotlight in the backdrop, and handles focus, keyboard navigation and screen-reader announcements. Use its card, or render your own.
Installation
pnpm add @inklu/tour
Peers: react and react-dom 18 or 19. The package ships "use client", so it can be imported from server components.
Quick start
Define tours, wrap the app in TourProvider, and start one with useTour from any component inside it.
Tours across pages
Pass onNavigate so a step on another route can push to your router. In Next.js, the provider goes in a client component:
AI setup
Paste this prompt into Claude Code, Cursor or any coding agent with write access to your project. It needs no other context.
For an agent that keeps working in the repo, install the agent skill instead. It carries the rules, not just the setup:
pnpm dlx skills add nkurunziza-saddy/inklu --skill inklu-tour
Agents reading the site start at /tour/llms.txt. The complete reference, including what this page leaves out, is /tour/llms-full.txt.
Targeting
Leave out target and put data-tour-step with the step id on the element. It survives class and markup changes that break selectors.
For elements that load late, give the target a timeout and a strategy. "skip" moves on if the element never appears; "error" reports it to onError.
Provider
useTour controls the tour from anywhere inside the provider, and config can change while a tour runs:
Custom card
Compose TourRoot, TourSpotlight and TourCard yourself to render any UI. Attach labelId and descriptionId so the dialog keeps its accessible name.
Step hooks, typed step meta, the tour store for control outside React, and showing a tour once are in the README, also served for agents as /tour/llms-full.txt.