0.0.6 • Published 7 years ago

react-app-tour v0.0.6

Weekly downloads
17
License
-
Repository
-
Last release
7 years ago

React app tour

Easily create a user tour for your responsive react application.

$ npm install react-app-tour --save

Simple usage

import React, { Component } from 'react';
import { Tour } from 'react-app-tour';

class App extends Component {
  render() {
    const steps = {
      1: {
        caretPosition: 'left',
        title: 'step 1',
        text: 'Welcome to step one.',
        top: "45%",
        left: 100
      },
      2: {
        caretPosition: 'right',
        title: 'step 2',
        text: 'This is step two.',
        top: 65,
        left: 20%
      },
      3: {
        caretPosition: 'top-left',
        title: 'step 3',
        text: 'Click \'Finish\' to complete the tour',
        top: 85,
        left: 50
      }
    };
    return (
      <div className="container">
        <Tour active={true} steps={steps} />
      </div>
    );
}

Props

NameTypeDefaultDescription
active*booleanRequiredShow or hide the tour
steps*ObjectRequiredAdds individual steps to the tour
colorstring'#048dbe'Overwrites the default theme color
backgroundstring'rgba(255, 255, 255, 0.5)'Overwrites the default background overlay
zIndexnumber999Overwrites the default z-index of the tour
nextLabelstring'Next'Overwrites the default 'Next-button' text
finishLabelstring'Finish'Overwrites the default 'Finish-button' text
onFinishfunction-Fired when the last step has been completed
onFinishfunction-Fired when the tour gets closed

License

MIT

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago