1.0.1 • Published 2 years ago

@cysense-hq/tourjs v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Website Guided Tour

How to Install

npm install @cysense-hq/tourjs --save

cysense-hq-website-guided-tour-demo

How to start

Via Button

Copy this HTML code and paste anywhere. Click on this button will start the tour.

<tour-start class="..." api="/Your-Api-Endpoint" id="...">Start the Tour</tour-start>

API here must be publicly available and GET method.

That's all you need to get started. You can skip following if you stick with the defaults.

Via JavaScript

function eventhandler(event) {
    // Your code goes here
    fetch('Your-API-Endpoint').then(response => {
        return response.json();
    }).then(response => {
        globalThis.webtour = new Tourjs(response);
    });
}

Warning: variable must be globalThis.webtour. Because this global variable is used in other custom web components.

Your API must be in the same format. You does not have an API. No worries. You can create a json file in your project public folder. and then add this file like api="getting-started-tour.json See our example api response json file here.

Read our Documentation for more

  1. Theme Customization
  2. API data format
  3. Event