npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-product-tour-highlight

v2.22.0

Published

React Product Tour Highlight: spotlight-based React onboarding flows and walkthroughs with tooltips and step navigation.

Readme

React Product Tour Highlight

A lightweight, developer-first React library for building spotlight-based product tours, React onboarding flows, and React walkthroughs with tooltips, step navigation, and basic accessibility.

-- Beautiful React product tours with smooth spotlight highlighting. -- Lightweight. No bloat. Works in minutes.

📦 Install: npm install react-product-tour-highlight


Demo

Product tour demo — spotlight, tooltip, and steps


Key Features

  • Spotlight highlight around a target element
  • Contextual tooltip with title + description
  • Next / Back / Skip (Close) navigation
  • Optional auto-scroll to bring the target into view
  • Designed for React 18+ + TypeScript
  • Accessible defaults (ESC to close, focus management)

Installation

npm i react-product-tour-highlight

Quick Start

import React, { useState } from "react";
import { ProductTour, type Step } from "react-product-tour-highlight";

export function Example() {
	const [isOpen, setIsOpen] = useState(true);

	const steps: Step[] = [
		{
			target: "#pricing",
			title: "See pricing",
			description: "This step highlights the pricing section.",
			placement: "bottom",
			offset: 10,
		},
		{
			target: "#start",
			title: "Get started",
			description: "Next, we guide you to the primary CTA.",
			placement: "top",
			offset: 10,
		},
	];

	return (
		<>
			<ProductTour
				steps={steps}
				isOpen={isOpen}
				initialStep={0}
				onClose={() => setIsOpen(false)}
			/>

			<div id="pricing" style={{ marginTop: 120 }}>
				Pricing
			</div>
			<button id="start">Start</button>
		</>
	);
}

Steps (React onboarding / walkthrough)

Each step points to a DOM node using either:

  • A CSS selector string (e.g. "#pricing"), or
  • A direct HTMLElement reference
export type Step = {
	target: string | HTMLElement;
	title: string;
	description?: string;
	placement?: "top" | "bottom" | "left" | "right";
	offset?: number;
};

Props (TypeScript)

  • steps: Step[] (required)
  • isOpen: boolean (optional). When provided, the tour is controlled by the parent.
  • initialStep: number (optional, default 0)
  • onClose: () => void (optional). Called when the user closes/skips the tour.
  • onStepChange: (nextStepIndex: number) => void (optional)

Accessibility

  • Uses a dialog role when open
  • ESC closes the tour
  • Keyboard support for advancing (Enter) and navigation buttons
  • Basic focus management within the tooltip

Notes

  • If a step target cannot be found, the library will warn in the console and skip positioning for that step.
  • For best results, ensure the target elements exist in the DOM when the tour opens.

License

MIT