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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-custom-tours

v1.5.3

Published

A library with tips that you can attach to blocks on your sites so that users can more easily understand how to use your site

Downloads

214

Readme

React-custom-tours 👩‍🏫🆘🔖

🪲 We recommend installing version starting from 1.3.6 (previous versions have problems) 🎉 A library for creating step-by-step hints in your applications (Click to open in npm) 🧪 Tested on projects in production 🔧 Before each update, the library is checked by autotests ⭐ I would be grateful if you put a star on the GitHub repo

Preview GIF 📹:

ScreenRecording2024-07-21at1 49 43PM-ezgif com-video-to-gif-converter

Custom themes 🌗:

Screenshot 2024-07-21 at 1 48 34 PM Screenshot 2024-07-21 at 1 47 54 PM

Custom colors 💅:

Screenshot 2024-07-21 at 1 49 16 PM

Installation 🔥:

npm install react-custom-tours pnpm install react-custom-tours yarn add react-custom-tours

Features 💫:

  • Easy to install in any application (installation time up to 10 minutes);
  • Full customization;
  • Light/dark mode support out of the box;
  • Adaptable to all screen sizes;
  • Keyboard control support;
  • Animations and smoothness out of the box;
  • Can be connected to any components. Also, modal windows with closing on the mousedown event will work, since this event has a stopPropagation listener;

The gist 👩‍💻:

import React from 'react';
import { TipsProvider, useTips } from 'react-custom-tours/dist/app/main';

function App() {
  const { setShow } = useTips(); // you should use this hook inside the provider

  // you can start showing tooltips when rendering the component, or add playback conditions
  // useEffect(() => {
  //     setShow(true);
  // }, []);

  return (
    <div>
      {/* click this button to start a tour */}
      <button onClick={() => setShow(true)}>Show tips!</button>
      <div id="tip-block">
        <h3>First block with tip!</h3>
      </div>

      <p id="tip-text">Text with tip!</p>
    </div>
  );
}

function Main() {
  <TipsProvider
    tips={[
      {
        idx: 1, // decent number of tip playback
        nodeId: 'tip-block', // block with tip id
        title: 'First block tip title!', // tip title (optional key)
        text: 'First block tip text!', // tip text
      },
      {
        idx: 2,
        nodeId: 'tip-text',
        text: 'Text block tip text!',
      },
    ]}
    theme="dark" // light is default (optional)
    primaryColor="#0dcaf0" // your app primary color (optional)
    tooltipBorderColor="#ffc107" // any color of your choice to highlight the block outline (optional)
    escapeToClose // adding closing tour using escape keydown (optional)
    isHiddenClose={true} // hide the close tour button until the last step (optional, default = false) (added in v1.3.8)
  >
    <App />
  </TipsProvider>;
}

Projects that use this library 👍: