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

@ranndev/ui-guide

v0.2.0

Published

A programmatic way of making highlight guide

Readme

Examples

  • CodePen - https://codepen.io/ranndev/pen/oNgvwQV

Installation

# Using npm
npm install @ranndev/ui-guide --save
# Using Yarn
yarn add @ranndev/ui-guide

Note: Popper.js is a peer dependency of this package. Make sure to install it too.

Setup

Styles

There are 2 required styles that must be included into your app.

  1. Base style - Includes the base styles for UIGuide elements. This is located from /dist/css/ui-guide(.min).css or /dist/scss/ui-guide.scss if you're using Scss.
  2. Theme style - Includes the styles that gives color and animation to UIGuide elements. This is located from /dist/css/themes/* or /dist/scss/themes/* if you're using Scss.

Scripts

If you're going to import the package using <script> tag, use UMD (Universal Module Definition).

Usage

Highlight element

Basic highlighting.

UIGuide.highlight('#target-element');

// or

const target = document.querySelector('#target-element');
UIGuide.highlight(target);

Highlight after highlight.

UIGuide.highlight('#get-started-button').then((highlighted) => {
  highlighted.element.onclick = () => {
    UIGuide.highlight('#second-step-button').then(() => {
      // ...
    });
  };
});

Using async ... await

async function startDemo() {
  const highligted1 = await UIGuide.highlight('#get-started-button');
  highlighted1.element.onclick = async () => {
    const highligted2 = await UIGuide.highlight('#second-step-button');
    // ...
  };
}

Highlight with popup

UIGuide.highlight({
  element: '#target-element',
  events: {
    onElementsReady: (elements) => {
      if (elements.popup) {
        // Do whatever you want to popup element
        elements.popup.innerHTML = '<p>Click Me!</p>';
      }
    },
  },
});

Unhighlight

UIGuide.highlight('#target-element', (highlighted) => {
  highlighted.unhighlight();
});

// or

UIGuide.clear();

Configure

Configuring the global settings.

Note: All the configuration properties in the code snippet below are optional.

UIGuide.configure({
  // Option on wether the target element should be clickable. true by default.
  clickable: true,
  // Automatically set the focus on the target element. Enabled by default.
  autofocus: true,
  // If `false`, It will throw an error immediately once searching for the
  // target element fail on the first try.
  wait: {
    // A delay (in milliseconds) before it will try to search for the target
    // element again. Default value is 150.
    delay: 150,
    // A maximum wait time before it give up on searching for the target element.
    // An error will be thrown when the set 'max' reached. Default value is Infinity
    max: Infinity,
  },
  // If true, a popup will show using the default popper.js options. It can
  // also be a popper options, which will use to override the
  // default popper options (https://popper.js.org/popper-documentation.html#Popper.Defaults).
  popper: true,
  // When this is set to 'highlight-box', the highlight's element
  // ('[uig-highlight-box]') will be used as the popper reference element.
  // It will be the highlighted element otherwise.
  popperRef: 'highlight-target',
  // Options for listening on events.
  events: {
    // This event will fire once the target element successfully queried.
    onTargetFound: (target) => {},
    // This will fire when the target, highlight, and popup (if available)
    // elements are ready.
    onElementsReady: (elements) => {},
    // This will fire everytime the highlight's element request an update.
    // Important! Listening on this event will bring you the full
    // responsibility of updating the highlight & popup elements. Make sure to
    // implement this function as performant as possible.
    onHighlightUpdate: (elements) => {},
  },
  // Overrides the update delay for the highlight element.
  // By default, the position and size of highlight element were updated every
  // 0 miliseconds.
  highlightUpdateDelay: 0,
});

Credits

Popper.js - For making our UIGuide's popup so incredible :tada:

License

This project is licensed under the MIT License - see the LICENSE file for details.