Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vue-shepherd

shipshapecode69.9kMIT5.0.1TypeScript support: included

A Vue wrapper for the site tour library Shepherd.

vue, site tour, tour, shepherd

readme

vue-shepherd

Ship Shape

vue-shepherd is built and maintained by Ship Shape. Contact us for web app consulting, development, and training for your project.

npm version Download count all time npm CI Build

This is a Vue wrapper for the Shepherd, site tour, library.

npm install vue-shepherd --save

Usage

Composition API (suggested)

First, in your main.js, import the styles

import 'shepherd.js/dist/css/shepherd.css'

Then, use shepherd in your components:

<template>
  <div ref="el">
    Testing
  </div>
</template>

<script setup>
  import { ref, onMounted } from 'vue'
  import { useShepherd } from 'vue-shepherd'

  const el = ref(null);

  const tour = useShepherd({
    useModalOverlay: true
  });

  onMounted(() =>  {
    tour.addStep({
      attachTo: { element: el.value, on: 'top' },
      text: 'Test'
    });

    tour.start();
  });
</script>

Option API

To use vue-shepherd with Option API you have to install the plugin which will add the '$shepherd' function to your vue app.

import { createApp } from 'vue';
import VueShepherdPlugin from 'vue-shepherd';
import '~shepherd.js/dist/css/shepherd.css';

createApp().use(VueShepherdPlugin).mount('#app');
<template>
  <div ref="el">
    Testing
  </div>
</template>

<script>
  import { defineComponent } from 'vue'

  export default defineComponent({
    data(){
      return {
        tour: null
      }
    },

    methods: {
      createTour(){
        this.tour = this.$shepherd({
          useModalOverlay: true
        });

        this.tour.addStep({
          attachTo: { element: this.$refs.el, on: 'top' },
          text: 'Test'
        });
      }
    },

    mounted(){
      this.createTour();
      this.tour.start();
    }
  });
</script>

SSR

For server side rendering project, you should import the vue-shepherd.ssr.js file.

import VueShepherd from 'vue-shepherd/dist/vue-shepherd.ssr.js';

Directives

WIP

changelog

v5.0.0 (2025-01-30)

Note: This was marked as a breaking change because Shepherd has switched from an MIT to AGPL-3.0 license.

:house: Internal

Committers: 1

v4.1.0 (2024-09-16)

:rocket: Enhancement

:memo: Documentation

Committers: 3

v3.0.0 (2023-04-03)

v2.0.1 (2022-10-27)

:bug: Bug Fix

Committers: 1

v2.0.0 (2022-10-23)

:boom: Breaking Change

Committers: 1

v0.3.0 (2022-06-20)

:boom: Breaking Change

Committers: 1

v0.2.1 (2020-06-22)

v0.2.0 (2020-06-22)

:boom: Breaking Change

Committers: 1

// TODO: release log here ...