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-tour-guide-cct

v1.0.15

Published

TourGuide is a customizable and interactive step-by-step guide for your web application. It allows developers to create guided tours for users, highlighting specific elements on the page, displaying contextual information, and providing voice assistance.

Readme

TourGuide React Component

TourGuide is a customizable and interactive step-by-step guide for your web application. It allows developers to create guided tours for users, highlighting specific elements on the page, displaying contextual information, and providing voice assistance.

Features

  • Step-by-Step Guide: Create a sequence of steps to guide users through your application.
  • Customizable Placement: Position the popover on top, bottom, left, or right of the target element.
  • Voice Assistance: Option to start and stop a voice agent that reads out the content of each step.
  • Highlighting: Automatically highlights the target element for better user focus.
  • Dynamic Updates: Adjusts the popover position and content dynamically as the user navigates through the steps.
  • Flexible Controls: Provides controls for navigating between steps, closing the tour, and toggling voice narration.
  • Theme Customization: Adjust the appearance of the popover and buttons using the theme prop.
  • Tour Start: Custom button used by the developer to start tour.

Installation

Install the package using npm:

npm install react-tour-guide-cct

Usage

Basic Setup

  1. Import the TourGuide component into your project:
import "react-tour-guide-cct/dist/react-tour-guide-cct.css";
import { TourGuide } from "react-tour-guide-cct";
  1. Define the steps for your tour:
const steps = [
  {
    target: "#element1",
    content: "This is the first step of the tour.",
  },
  {
    target: "#element2",
    content: "This is the second step of the tour.",
  },
  {
    target: "#element3",
    content: (
      <div>
        <h1>Demo</h1>
        <img src="demo.jpg" alt="demo" />
      </div>
    ),
  },
];
  1. Use the TourGuide component in your application:
<TourGuide
  steps={steps}
  placement="bottom"
  onComplete={() => alert("Tour Completed")} //define your own function and use it here
  onStepChange={() => alert("Please carry on...")} //define your own function and use it here
  showCloseButton={true}
  highlightClass="tour-highlight"
  theme={{
    popoverBackgroundColor: "#fff",
    popoverTextColor: "#000",
    popoverBorderRadius: "20px",
    buttonBackgroundColor: "blue",
    buttonTextColor: "#fff",
    animation: "slide-in",
  }}
  startButton={<button className="start-tour-button">Start Tour</button>}
/>

Props

TourGuide Props

| Prop | Type | Default | Description | | ----------------- | -------------- | ---------------- | -------------------------------------------------------------------- | | steps | Array | [] | Array of steps for the tour, each containing target and content. | | placement | string | bottom | Placement of the popover (top, bottom, left, right). | | onComplete | Function | () => {} | Callback function triggered when the tour is completed. | | onStepChange | Function | () => {} | Callback function triggered when the step changes. | | showCloseButton | boolean | true | Determines whether to show the close button on the popover. | | highlightClass | string | tour-highlight | Custom CSS class for highlighting the target element. | | theme | object | {} | CSS properties to add the theme to a popover as per developer. | | startButton | ReactElement | React | Custom button used by the developer to start tour. |

Popover Props

| Prop | Type | Description | | ------------------ | ------------- | ------------------------------------------------------------------ | | content | string, JSX | Content to display inside the popover. | | position | object | Position of the popover (top and left coordinates). | | onClose | Function | Callback function triggered when the popover is closed. | | onNext | Function | Callback function triggered when the "Next" button is clicked. | | onPrev | Function | Callback function triggered when the "Previous" button is clicked. | | isFirst | boolean | Determines if the current step is the first step. | | isLast | boolean | Determines if the current step is the last step. | | stepInfo | string | Displays the current step information (e.g., "Step 1 of 3"). | | showCloseButton | boolean | Determines whether to show the close button on the popover. | | highlightClass | string | Custom CSS class for highlighting the target element. | | theme | object | CSS properties to add the theme to a popover as per developer. | | voiceAgent | boolean | Determines if the voice agent is active. | | toggleVoiceAgent | Function | Function to toggle the voice agent on or off. |


Example

Complete Implementation

import React from "react";
import TourGuide from "react-tour-guide-cct";

const App = () => {
  const steps = [
    {
      target: "#step1",
      content: "This is step 1 of the tour.",
    },
    {
      target: "#step2",
      content: "This is step 2 of the tour.",
    },
    {
      target: "#step3",
      content: "This is the final step of the tour.",
    },
  ];

  return (
    <div>
      <h1 id="step1">Welcome to the Tour!</h1>
      <p id="step2">This is the second step.</p>
      <button id="step3">Finish the tour here.</button>

      <TourGuide
        steps={steps}
        placement="bottom"
        onComplete={() => alert("Tour completed!")}
        onStepChange={() => console.log("Step changed")}
        showCloseButton={true}
        highlightClass="tour-highlight"
        startButton={<button className="start-tour-button">Start Tour</button>}
        theme={{
          popoverBackgroundColor: "#fff",
          popoverTextColor: "#000",
          popoverBorderRadius: "20px",
          buttonBackgroundColor: "blue",
          buttonTextColor: "#fff",
          animation: "slide-in",
        }}
      />
    </div>
  );
};

export default App;

License

This project is licensed under the MIT License.


Author

[Rehan Shah]