New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-guide

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-guide

a guide component for web page

latest
npmnpm
Version
1.2.9
Version published
Maintainers
1
Created
Source

react-guide

A reactjs component is used for web page guidance

Table of Contents

  • Installation
  • API documentation
  • Examples
  • demo

Installation

To install, you can use npm

$ npm install react-guide

API documentation

PropertyDescriptionTypeDefault
visibleWhether the guide is visible or notbooleanfalse
audioWhether a voice reads of tip of the guide or notbooleantrue
lanThe voice of language, 'en' or 'zh'stringen
bulletWhether bullets (.) button is visible on middle of the guide or notbooleanfalse
numWhether num icon is visible on top left of the guide or notbooleanfalse
onCancelSpecify a function that will be called when a user clicks shadow, skip button on bottom leftfunction(e)-
onOkSpecify a function that will be called when all steps have done and click the done buttonfunction(e)-
data-stepNumber of steps for guides, only use in domstring-
data-tipEvery step you want to show tip, only use in domstring-

Examples

Here is a simple example of react-guide being used in an app

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Guide from 'react-guide'
class App extends Component {
  constructor () {
    super()
    this.state = {
      visible: false
    }
  }
  handleStart() {
    this.setState({
      visible: true
    })
  }
  handleCancel() {
    this.setState({
      visible: false
    })
  }
  render() {
    return (
      <div>
        <Guide 
          visible={this.state.visible} 
          onCancel={this.handleCancel.bind(this)} >
            <h1 data-step="1" data-tip='Hello World'>Step1</h1>
            <div data-step="3" data-tip='Welcome to use react-guide'>Step3</div>
            <h4 data-step="2" data-tip='react-guide is very easy' >Step2</h4>
            <div><span data-step="4" data-tip='Let start'>Step4</span></div>
      </Guide>
      <button onClick={this.handleStart.bind(this)}>start</button>
    </div>
    );
  }
}
ReactDOM.render(<App />, document.getElementById('root'));

You can find more examples in the examples directory, which you can run in a local development server using npm start.

demo

This is a demo show guide demo

FAQs

Package last updated on 08 Apr 2019

Did you know?

Socket

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