React-native rendering
Use React components and a Context-scoped instance instead of wrapping an imperative DOM library.
React
@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.
npm i @glowhop/react-tour @glowhop/styles-tour25.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.
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} />
</>
);
}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.
Call useGlowTour() inside a React component. It returns the tour instance plus create, start, cancel and the current status.
Describe the onboarding tour with the builder: create("product-tour").step({ id, target, title, content }).build(), one step per element you want to highlight.
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.
Use React components and a Context-scoped instance instead of wrapping an imperative DOM library.
Run the same typed tour workflow in current React applications, with SSR-safe behavior for Next.js.
Use GlowTourDefault immediately or compose the lower-level React primitives into your own interface.
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.
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.
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.
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.
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.
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.