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

hintflow

v1.0.0

Published

A lightweight and easy-to-configure React library for creating dismissable in-app cues, helping you guide users through new features or important changes in a non-intrusive way.

Downloads

5

Readme

hintflow

hintflow is a lightweight and easy-to-configure React library for creating dismissable in-app cues, helping you guide users through new features or important changes in a non-intrusive way.

Features

  • Non-Intrusive Cues: Display subtle popups to inform users about new features or important updates.
  • Configurable Positioning: Place cues above, below, left, or right of target elements.
  • Persistent Dismissal: Cues won't reappear for users who have already seen and dismissed them.
  • Easy Integration: Quickly integrate with any React component using simple props.

Installation

Install the library using npm or yarn:

npm install hintflow

or

yarn add hintflow

Usage

To use hintflow, import the Hint component and specify the target element selector, message, and optional positioning.

import React from 'react';
import { Hint } from 'hintflow';

function App() {
  return (
    <div className="App">
      <h1 id="welcome">Welcome to hintflow!</h1>
      <Hint
        id="welcome-hint"
        message="Check out this awesome new feature!"
        targetSelector="#welcome"
        position="bottom"
        align="center"
        color="#808080"
      />
    </div>
  );
}

export default App;

Hint Props

  • id (string, required): Unique identifier for the hint. This ensures the hint does not repeatedly appear once dismissed.
  • message (string, required): The message to display inside the hint.
  • targetSelector (string, required): A CSS selector for the target element that the hint should be anchored to.
  • dismissable (boolean, optional, default: true): Whether the hint can be dismissed by the user.
  • position (string, optional, default: 'bottom'): Position of the hint relative to the target element. Can be 'top', 'bottom', 'left', or 'right'.
  • align (string, optional, default: 'center'): Alignment of the hint relative to the target element. Can be 'left', 'center', or 'right'.

Example

Here's how you might use hintflow to introduce a new button in your UI:

import React from 'react';
import { Hint } from 'hintflow';

function App() {
  return (
    <div>
      <button id="new-feature-button">New Feature</button>
      <Hint
        id="new-feature-hint"
        message="Click here to try out our new feature!"
        targetSelector="#new-feature-button"
        position="bottom"
        align="center"
      />
    </div>
  );
}

export default App;

Contributing

We welcome contributions! Please submit issues or pull requests to help improve hintflow.

Local Development

Clone the repository:

git clone https://github.com/parthematics/hintflow.git
cd hintflow

Install dependencies:

yarn

Run the development server:

yarn start

Build the library:

yarn build

License

hintflow is licensed under the MIT License. See the LICENSE file for more details.