react-guide
A reactjs component is used for web page guidance
Table of Contents
Installation
To install, you can use npm
$ npm install react-guide
API documentation
Property | Description | Type | Default |
---|---|---|---|
visible | Whether the guide is visible or not | boolean | false |
audio | Whether a voice reads of tip of the guide or not | boolean | true |
lan | The voice of language, 'en' or 'zh' | string | en |
bullet | Whether bullets (.) button is visible on middle of the guide or not | boolean | false |
num | Whether num icon is visible on top left of the guide or not | boolean | false |
onCancel | Specify a function that will be called when a user clicks shadow, skip button on bottom left | function(e) | - |
onOk | Specify a function that will be called when all steps have done and click the done button | function(e) | - |
data-step | Number of steps for guides, only use in dom | string | - |
data-tip | Every step you want to show tip, only use in dom | string | - |
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' { thisstate = visible: false } { this } { this } { return <div> <Guide = = > <h1 ="1" ='Hello World'>Step1</h1> <div ="3" ='Welcome to use react-guide'>Step3</div> <h4 ="2" ='react-guide is very easy' >Step2</h4> <div><span ="4" ='Let start'>Step4</span></div> </Guide> <button =>start</button> </div> ; }ReactDOM;
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