Socket
Socket
Sign inDemoInstall

reactjs-onboarding

Package Overview
Dependencies
58
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reactjs-onboarding

A node module that will help user create a tour of an application. Note: reactjs-onboarding is in development mode.


Version published
Weekly downloads
41
decreased by-14.58%
Maintainers
2
Install size
94.0 kB
Created
Weekly downloads
 

Readme

Source

reactjs-onboarding

The reactjs-onboarding library exported as Node.js modules.

NPM JavaScript Style Guide

grab-landing-page

Installation

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

1) This github repository, using git clone

2) Using npm npm install reactjs-onboarding.js --save

Usage

reactjs-onboarding.js can be added to your project in four simple steps:

1) Include named imports of Onboarding.js and OnboardingItem.js / OnboardingTag.js in your project

import {Onboarding} from 'reactjs-onboarding'
import {OnboardingItem} from 'reactjs-onboarding'
import {OnboardingTag} from 'reactjs-onboarding'

2) Create a state variable visible in the class and set it to false

state = { visible:false };

3) Set visible parameter to true when you want the Onboarding to get called

  this.setState({ visible: true })

4) Passing the coordinates

  • Give unique Id to the element that you want to point the arrow to
<div id="example">
 Pass the co-ordinates by id
</div>
<Onboarding name="testing" visible={this.state.visible}>
  <OnboardingItem elementID="example" message="This is the onborading message 1" />
</Onboarding>

  • Give unique reference to the element you want to point the arrow to
<div ref={(e) => this.reference = e}>
 Pass the co-ordinates by reference
</div>
<Onboarding name="testing" visible={this.state.visible}>
  <OnboardingItem elementID={this.reference} message="This is the onboarding message 2" />
</Onboarding>

  • Give coordinates in the form of object of the area where you want to point the arrow to. l - left, t - top, w - width, h- height
<Onboarding name="testing" visible={this.state.visible}>
  <OnboardingItem elementCoOrdinate={{ l: 100, t: 100, w: 100, h: 100 }} message="This is the onboarding message 3" />
</Onboarding>

  • Enclose the elements you want to highlight in an OnboardingTag
<OnboardingTag message="More options via OnboardingTag">
 <IconButton id="options">
   <MoreVertIcon />
 </IconButton>
</OnboardingTag>


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT �

Keywords

FAQs

Last updated on 03 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc