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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ghg/tourish

v0.1.1

Published

Guide users through your app with a clean, modular tour experience.

Readme

Tour Component Library

Guide users through your app with a clean, modular tour experience.

Core Features

  • Simple, step-based guidance
  • Custom styling and theming
  • Highlighting and drawing attention to specific UI elements

Component Architecture

Tour (Root)

Purpose: Controls overall visibility and step logic. Role: Hosts the full tour lifecycle and connects to context.

  • Show/hide state management
  • Step tracking and transitions
  • Global backdrop control

TourContainer

Purpose: Wraps each step's visual content. Role: Ensures consistent positioning and layout.

  • Overlay backdrop styling
  • Responsive positioning logic
  • Custom layout options

TourControls

Purpose: Lets users move forward, backward, or exit. Role: Separates navigation from content.

  • Previous and Next navigation
  • Skip to any step
  • End tour early
  • Customizable labels and buttons

TourStepContent

Purpose: Provides the specific text and visuals per step. Role: Keeps presentation separate from navigation.

  • Smooth animated step content
  • Flexible title/body formatting
  • Multiple paragraph support
  • Scoped styling

Navigation Methods

  • Sequential: Move step-by-step using Next/Previous
  • Direct Skip: Jump directly to a specific step
  • Early Exit: Allow users to exit the tour at any time
  • Keyboard Navigation: Use arrow keys or Escape to navigate

Theming Options

  • Tailwind Classes: Apply custom styles via xClassName props
  • Custom Rendering: Replace or extend internal components

Documentation

For detailed usage examples and API documentation, please refer to our Storybook documentation.

Getting Started

Install dependencies

yarn

Run Storybook

yarn storybook

Multiple Tours Support

The library supports defining and running multiple tours within a single application:

  • Define different tours for different features or user journeys
  • Start specific tours by ID
  • Maintain separate completion state for each tour

Example:

// Define multiple tours
const appTours = {
  onboarding: {
    steps: [
      { title: "Welcome", content: ["First-time user introduction"] },
      // more steps...
    ],
  },
  "new-feature": {
    steps: [
      { title: "New Feature", content: ["Introducing our latest feature"] },
      // more steps...
    ],
  },
};

// Set up the provider with multiple tours
<TourProvider
  tours={appTours}
  defaultTourId="onboarding"
  pathname={pathname}
  navigate={navigate}
>
  <AppContent />
  <TourManager />
</TourProvider>;

// Start a specific tour
const { startTour } = useTour();
startTour("new-feature");

Tour Manager

The TourManager component connects to the tour context automatically, simplifying the implementation:

// Instead of manually passing all tour state:
<Tour
  steps={tourContext.steps}
  currentStepIndex={tourContext.currentStepIndex}
  isOpen={tourContext.isOpen}
  // ...other props
/>

// Simply use the TourManager within a TourProvider:
<TourManager
  // Only styling props should be passed if needed
  backdropClassName="custom-backdrop"
  containerClassName="custom-container"
/>