Skip to content
Vue Tour is a lightweight, simple and customizable guided tour plugin for use with Vue.js. It provides a quick and easy way to guide your users through your application.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore(ci): run the e2e tests in headless mode Oct 16, 2018
demo chore: bump the vue-tour version in the demo Oct 17, 2018
dist chore: generate a new build Oct 16, 2018
docs chore: generate a new build Oct 17, 2018
public chore: add a deploy script Feb 22, 2018
src chore: generate a new build Oct 16, 2018
test/unit test: check if currentStep stays within the boundaries of the number … Mar 13, 2018
.babelrc chore: initial commit Feb 15, 2018
.eslintrc chore: initial commit Feb 15, 2018
.gitignore chore(gitignore): commit the /dist folder Feb 19, 2018
.postcssrc chore: initial commit Feb 15, 2018
CHANGELOG.md chore(release): 1.1.0 Oct 16, 2018
CONTRIBUTING.md chore: add a README and a CONTRIBUTING file Feb 19, 2018
LICENCE chore: add a LICENCE file Feb 19, 2018
README.md chore: add a status badge for master Feb 22, 2018
deploy.sh
package-lock.json chore(release): 1.1.0 Oct 16, 2018
package.json chore(release): 1.1.0 Oct 16, 2018
screenshot.gif chore: add a README and a CONTRIBUTING file Feb 19, 2018

README.md

Vue Tour

CircleCI

Vue Tour is a lightweight, simple and customizable tour plugin for use with Vue.js. It provides a quick and easy way to guide your users through your application.

Vue Tour

Table of Contents

Getting Started

You can install vue-tour using npm or by downloading the minified build on GitHub.

npm install vue-tour

Then import the plugin in your application entry point (typically main.js if you used vue-cli to scaffold your project) and tell Vue to use it. Also don't forget to include the styles. You can add the styles provided by default or customize them to your own liking.

import Vue from 'vue'
import App from './App.vue'
import VueTour from 'vue-tour'

require('vue-tour/dist/vue-tour.css')

Vue.use(VueTour)

new Vue({
  render: h => h(App)
}).$mount('#app')

Finally put a v-tour component in your template anywhere in your app (usually in App.vue) and pass it an array of steps. The target property of each step can target a DOM element in any component of your app (as long as it exists in the DOM when the concerned step pops up).

<template>
  <div>
    <div id="v-step-0">A DOM element on your page. The first step will pop on this element because its ID is 'v-step-0'.</div>
    <div class="v-step-1">A DOM element on your page. The second step will pop on this element because its ID is 'v-step-1'.</div>
    <div data-v-step="2">A DOM element on your page. The third and final step will pop on this element because its ID is 'v-step-2'.</div>

    <v-tour name="myTour" :steps="steps"></v-tour>
  </div>
</template>

<script>
  export default {
    name: 'my-tour',
    data () {
      return {
        steps: [
          {
            target: '#v-step-0',  // We're using document.querySelector() under the hood
            content: `Discover <strong>Vue Tour</strong>!`
          },
          {
            target: '.v-step-1',
            content: 'An awesome plugin made with Vue.js!'
          },
          {
            target: '[data-v-step="2"]',
            content: 'Try it, you\'ll love it!<br>You can put HTML in the steps and completely customize the DOM to suit your needs.',
            params: {
              placement: 'top'
            }
          }
        ]
      }
    },
    mounted: function () {
      this.$tours['myTour'].start()
    }
  }
</script>

For all individual elements you want to add a step on, make sure it can be retrieved with document.querySelector(). You can use any selector, an ID, a CSS class, data attributes, etc. Once this is done and your steps correctly target some DOM elements of your application, you can start the tour by calling the following method.

this.$tours['myTour'].start()

For a more detailed documentation, checkout the docs for vue-tour.

Something Missing?

If you have a feature request or found a bug, let us know by submitting an issue.

You can’t perform that action at this time.