Skip to content

Garfill/vue3-driver

Repository files navigation

V-Driver

A lib for drive the user's focus across the page with Vue3 and Driver.js.

Install

pnpm i v-driver (npm or yarn)

Usage

// main.ts
import vdriver from 'v-driver'
vueapp.use(vdriver, option?)

Option can be found here

// component.vue
// now you can use v-step:index
// template
<div v-step:1>/* first content */</div>
<div v-step:2>/* second content */</div>

// script in setup
<script setup>
    import { useDriver } from 'v-driver'
    const  driver = useDriver()
    onMounted(() => {
        driver.drive()
    })
</script>

Notice

Please make sure the index in (v-step:[index]) is unique in one page.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published