Skip to content
Uxelith
Prov1.1.0Navigation

Product Tour

A guided tour that spotlights each part of your screen in turn, with a card that always stays in view and a focus trap that hands focus back when it ends.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
11 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import * as React from "react"

import { ProductTour } from "@/components/product-tour"

export function Welcome() {
  const [open, setOpen] = React.useState(false)
  return (
    <div>
      <button type="button" data-tour="new" onClick={() => setOpen(true)}>
        Take the tour
      </button>
      <ProductTour
        open={open}
        onOpenChange={setOpen}
        steps={[
          { target: "[data-tour='new']", title: "Start here", body: "Create your first report." },
          { title: "That's it", body: "You can replay this tour from Help." },
        ]}
      />
    </div>
  )
}

Props

PropTypeDefaultDescription
stepsTourStep[]—Each step: target (a CSS selector or a function), title and body. No target centres the card.
openboolean—Whether the tour is running. Leave it out to let the tour run itself.
defaultOpenbooleanfalseRun the tour once the page has loaded, when open is left out.
onOpenChange(open, finished) => void—Called with false when it ends; finished tells a completed tour from a skipped one.
paddingnumber6Space around the highlighted element, in pixels.
radiusnumber12Rounded corners of the highlight, in pixels.
nextLabel / backLabel / skipLabel / doneLabelstringNext / Back / Skip / DoneButton text.

Accessibility

  • A modal dialog: focus moves into the card, Tab stays inside, Escape skips, and Left and Right step through.
  • Focus returns to where it was when the tour ends.
  • The highlighted element scrolls into view; the card stays on screen at every size.
  • The spotlight jumps instead of gliding under prefers-reduced-motion.

Changelog

  1. v1.1.0Latest

    open and onOpenChange are now optional: give it defaultOpen and the tour runs by itself once the page has loaded, e.g. on a first visit.

  2. v1.0.0

    First release.

More in Navigation

All 10 in Navigation
  • NavigationFree

    Accordion

    Questions that spring open to their answers — reversible mid-way — with a hover highlight that glides between titles and a plus that folds into a minus (or a chevron). Single or multiple open, two looks.

  • NavigationFree

    Animated Tabs

    Tabs with an indicator that springs to the selected tab, a hover highlight that follows the pointer, and panels that slide in from the side you're heading to while the height eases to fit. Pill or underline.

  • NavigationFree

    Bottom Sheet

    A sheet that rises from the bottom and rests at the heights you choose: modal for a focused task, or non-modal beside a map or player that stays usable behind it. Scroll hands off to drag, sheets stack, and it rises above the keyboard.