`vue3-tour` is a lightweight, simple, and customizable tour plugin designed specifically for Vue.js 3 applications. It guides users through an application by highlighting elements and displaying contextual information in a step-by-step fashion. Currently at stable version 1.0.3, it is a direct fork of the popular `vue-tour` library, re-engineered for compatibility with the Vue 3 composition API and ecosystem. While release cadence isn't highly frequent, the project shows ongoing maintenance with recent fixes. Key differentiators include its ease of integration with Vue 3's `createApp` pattern, the ability to target any DOM element via standard CSS selectors, and support for asynchronous `before()` functions in steps for complex UI transitions. It ships with TypeScript types, enhancing developer experience in TypeScript projects.
npm install vue3-tourVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `vue3-tour`, register the plugin, include necessary styles, define tour steps targeting specific DOM elements, and programmatically start a guided tour.
Rewrite tour components and plugin registration to align with Vue 3's `createApp` API and component lifecycle. Update imports and component usage accordingly.
Add `import 'vue3-tour/dist/vue3-tour.css'` to your application's entry point (e.g., `main.js` or `main.ts`).
Ensure the DOM element targeted by a step is rendered and available before `this.$tours['yourTour'].start()` or `nextStep()` is called. Utilize the `before()` hook within steps for asynchronous UI preparation if elements are conditionally rendered or loaded.
Ensure `app.use(Vue3Tour)` is called in your `main.js/ts` file and that the `<v-tour name="yourTourName" :steps="steps"></v-tour>` component is present and rendered in your application's template hierarchy.
Verify the import statement. It must be `import 'vue3-tour/dist/vue3-tour.css'`.
Add `import 'vue3-tour/dist/vue3-tour.css'` to your application's entry file. If already present, inspect your application's styles for conflicts that might be overriding `vue3-tour`'s default CSS rules.