JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q35458F
  • License MIT

Package Exports

  • driver.jsx
  • driver.jsx/dist/style.css

Readme

Driver.jsx

Create a Seamless User Onboarding and User Journey.

A wrapper hooks (stable) and components (in-development) for driver library that can be used in React > 17.

It uses driver.js that is performant, lightweight and have inbuilt animations.

Install

NPM

npm install driver.jsx

Getting Started

import { useEffect, useRef } from "react";
import { useDriver } from "driver.jsx";
import "driver.jsx/dist/style.css";

const { driver, isActivated } = useDriver({
  allowClose: false,
});

const basicRef = useRef(null);

useEffect(() => {
  if (basicRef && isActivated) {
    driver.highlight({
      element: basicRef.current,
      popover: {
        title: "Title for the Popover",
        description: "Description for it",
      },
    });
  }
});

Example

All of the Examples are placed in examples directory

Development

Setting up a local development environment is easy!

Clone (or fork) this repo on your machine, navigate to its location in the terminal and run:

yarn install
yarn start:dev

Change the code in the lib directory, create an example for in the examples directory or in the src directory

Start coding! 🥳