GlowTour.js
Get started

React

React product tour & onboarding library

@glowhop/react-tour is the React adapter of GlowTour.js, an open-source product tour library for building onboarding tours, feature walkthroughs and guided tours in React.

Native React components and a Context-scoped tour instance, built for React 18 and 19. No portals to wire up yourself - GlowTourDefault renders the popover, overlay, and pointer for you.

Install

npm i @glowhop/react-tour @glowhop/styles-tour

25.1 KiB gzipped in total: 0.3 KiB of adapter over the shared 23.5 KiB engine, plus 1.3 KiB of theme CSS you can replace with your own.

@glowhop/react-tour on npm · @glowhop/styles-tour on npm

Quick start

A component-scoped integration using the React lifecycle API. See the full guide for additional setup and customization.

import "@glowhop/styles-tour/default.css";
import { GlowTourDefault, useGlowTour } from "@glowhop/react-tour";

export function TourApp() {
  const { tour, create, start, cancel, status, currentStepIndex, totalSteps } = useGlowTour();

  function startTour() {
    const workflow = create("product-tour")
      .step({
        id: "features",
        target: '[data-tour="features"]',
        title: "Explore features",
        content: "Learn about all the capabilities.",
      })
      .step({
        id: "pricing",
        target: '[data-tour="pricing"]',
        title: "Check pricing",
        content: "See plans that fit your needs.",
      })
      .build();
    void start(workflow);
  }

  return (
    <>
      <main>
        <section data-tour="features">
          <h2>Features</h2>
          <p>We offer guided tours, SSR support, and full keyboard navigation.</p>
        </section>
        <section data-tour="pricing">
          <h2>Pricing</h2>
          <p>Open source and free.</p>
        </section>
        {status === "active" ? (
          <p>
            Step {currentStepIndex + 1} of {totalSteps} <button onClick={() => void cancel()}>Stop</button>
          </p>
        ) : (
          <button onClick={startTour}>Start tour</button>
        )}
      </main>
      <GlowTourDefault tour={tour} />
    </>
  );
}

How to build a React onboarding tour

  1. Install the adapter and the default theme with npm i @glowhop/react-tour @glowhop/styles-tour, then import "@glowhop/styles-tour/default.css" once, in your app entry or the component that renders the tour.

  2. Call useGlowTour() inside a React component. It returns the tour instance plus create, start, cancel and the current status.

  3. Describe the onboarding tour with the builder: create("product-tour").step({ id, target, title, content }).build(), one step per element you want to highlight.

  4. Render <GlowTourDefault tour={tour} /> once and call start(workflow) from an event handler, such as a "Take the tour" button or the first visit after sign-up.

Why use GlowTour.js for React product tours?

React-native rendering

Use React components and a Context-scoped instance instead of wrapping an imperative DOM library.

React 18 and 19 support

Run the same typed tour workflow in current React applications, with SSR-safe behavior for Next.js.

Composable by design

Use GlowTourDefault immediately or compose the lower-level React primitives into your own interface.

React product tour FAQ

How do I create a product tour in React?

Install @glowhop/react-tour and @glowhop/styles-tour, call useGlowTour() inside a React component, build a workflow with create(), render GlowTourDefault with the returned tour, then call start() from an event handler.

Does GlowTour.js work with Next.js?

Yes. Keep tour creation and rendering in a client component, import the default theme once, and render GlowTourDefault near your application root. The React adapter is tested against server rendering and hydration.

Can I customize the React tour UI?

Yes. You can replace the default theme with your own CSS or compose the React adapter's lower-level components when you need full control over the popover, overlay, pointer, and controls.

Is GlowTour.js a React Joyride alternative?

Yes. Both render product tours as React components. GlowTour.js adds a chainable builder, composable popover primitives, verified server rendering in Next.js, and the same tour engine for Vue, Angular, Solid and vanilla JavaScript if your product is not React-only.

How big is the React product tour library?

25.1 KiB gzipped in total: 0.3 KiB for @glowhop/react-tour, 23.5 KiB for the shared core engine, and 1.3 KiB for the default theme CSS, which you can replace with your own. The core has no runtime dependencies.

Is @glowhop/react-tour free for commercial use?

Yes. Every GlowTour.js package is MIT-licensed: free for commercial and closed-source products, with no paid tier and no attribution requirement.

Need the complete API and framework-specific setup? Read the React integration guide.