Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tour-component

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tour-component

A vuejs, reactjs and angular tour component.

  • 5.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Dependency Status devDependency Status Build Status: Linux Build Status: Windows npm version Downloads

tour-component

A vuejs, reactjs and angular tour component.

features
  • vuejs component
  • reactjs component
  • angular component
  • highlight target element
  • scroll to target
install

npm i tour-component

<link rel="stylesheet" href="./node_modules/tour-component/tour.min.css" />
vuejs component demo

npm i vue vue-class-component

import "tour-component/vue";
<tour :data="data"
    @update="update($event)">
</tour>

the online demo: https://plantain-00.github.io/tour-component/demo/vue/index.html

reactjs component demo
import { Tour } from "tour-component/react";
<Tour data={this.data}
    update={e => this.update(e)}>
</Tour>

the online demo: https://plantain-00.github.io/tour-component/demo/react/index.html

angular component demo
import { TourModule } from "tour-component/angular";

// for angular AOT:
// import { TourModule } from "tour-component/aot/angular";

@NgModule({
    imports: [BrowserModule, FormsModule, TourModule],
    declarations: [MainComponent],
    bootstrap: [MainComponent],
})
class MainModule { }
<tour [data]="data"
    (update)="update($event)">
</tour>

the online demo: https://plantain-00.github.io/tour-component/demo/angular/index.html

the AOT online demo: https://plantain-00.github.io/tour-component/demo/aot/index.html

properties and events of the component
nametypedescription
dataTourData[]the data of the tour
update(index: number)=> voidtriggered when press next or close
tour data structure
type TourData = {
    steps: Step[],
    localStorageKey: string;
    index: number;
};

type Step = {
    left?: string | (() => string);
    right?: string | (() => string);
    top?: string | (() => string);
    bottom?: string | (() => string);
    direction: "left" | "right" | "top" | "bottom";
    content: string;
    next: string;
    scrollTop?: number;
    targetElementId?: string;
};
change log
// v4 angular AOT:
import { TourModule } from "tour-component/angular";

// v5 angular AOT:
import { TourModule } from "tour-component/aot/angular";
// v4
import "tour-component/vue";

// v3
import "tour-component/dist/vue";
// v2 to v3
move `index` into `data` from as a property
// v1 to v2
move `index` out from `data` as a property
add `update` event

FAQs

Package last updated on 20 Nov 2017

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc