### Install VueJS Tour Source: https://context7.com/globalhive/vuejs-tour/llms.txt Install the package using npm, pnpm, yarn, or bun. ```sh npm add @globalhive/vuejs-tour # or pnpm add @globalhive/vuejs-tour # or yarn add @globalhive/vuejs-tour # or bun add @globalhive/vuejs-tour ``` -------------------------------- ### VTour Component with Highlight Enabled Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/highlight-target.md This example demonstrates a complete setup for the `VTour` component, including enabling the `highlight` prop, auto-starting the tour, and disabling local storage saving. ```vue

Target

``` -------------------------------- ### startTour() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Programmatically start the tour from the first step or the last saved step. Useful for event-driven tour starts. ```APIDOC ## `startTour()` — Start the Tour Programmatically start the tour from the first step (or the last saved step when `saveToLocalStorage="step"`). Use `autoStart` prop for mount-time start, or call `startTour()` via template ref for event-driven starts. ### Method Signature `tour.value?.startTour()` ### Usage Example ```vue ``` ``` -------------------------------- ### VTour with Backdrop Enabled via Script Setup Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/using-a-backdrop.md This example demonstrates how to use the `VTour` component with the backdrop enabled, triggered by a button click. Ensure the necessary imports and styles are included. ```vue
``` -------------------------------- ### Start VTour Programmatically Source: https://context7.com/globalhive/vuejs-tour/llms.txt Initiate the tour from the first step or the last saved step using the startTour() method. This is useful for event-driven tour starts. ```vue ``` -------------------------------- ### Basic VueJS Tour Setup Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/getting-started.md Import and use the VTour component and its default styles in your App.vue file. Ensure you have Vue 3.x or higher installed. ```vue ``` -------------------------------- ### Install VueJS Tour with npm Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/getting-started.md Use npm to add VueJS Tour to your project dependencies. ```sh npm add @globalhive/vuejs-tour ``` -------------------------------- ### Install VueJS Tour with bun Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/getting-started.md Use bun to add VueJS Tour to your project dependencies. ```sh bun add @globalhive/vuejs-tour ``` -------------------------------- ### Install VueJS Tour with pnpm Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/getting-started.md Use pnpm to add VueJS Tour to your project dependencies. ```sh pnpm add @globalhive/vuejs-tour ``` -------------------------------- ### Setting Step Placement Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/using-placement.md Example of setting the `placement` property for a tour step to 'top'. The tour will attempt to place it at the top-middle. ```vue ``` -------------------------------- ### Automatically Start Tour in Vue.js Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/create-a-tour.md Use the `autoStart` prop on the VTour component to automatically initiate the tour when the component is mounted. ```vue ``` -------------------------------- ### Manually Start Tour with `ref` Source: https://github.com/globalhive/vuejs-tour/blob/master/README.md Control tour initiation programmatically by using a `ref` to access the component instance and calling the `startTour()` method within `onMounted`. ```vue ``` -------------------------------- ### Install VueJS Tour with yarn Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/getting-started.md Use yarn to add VueJS Tour to your project dependencies. ```sh yarn add @globalhive/vuejs-tour ``` -------------------------------- ### Vue.js Tour TypeScript Types and Usage Example Source: https://context7.com/globalhive/vuejs-tour/llms.txt All public types are exported from the package root for type safety. Includes an example of a typed composable wrapping tour control methods. ```typescript import type { ITourStep, VTourProps, VTourEvents, VTourEmits, VTourData, VTourExposedMethods, ButtonLabels, SaveToLocalStorage, JumpOptions, NanoPopPosition, } from '@globalhive/vuejs-tour'; // Example: typed composable that wraps tour control import { ref } from 'vue'; import { VTour } from '@globalhive/vuejs-tour'; function useTour(steps: ITourStep[]) { const tour = ref>(); const start = () => tour.value?.startTour(); const reset = () => tour.value?.resetTour(true); const jump = (i: number) => tour.value?.goToStep(i); return { tour, start, reset, jump }; } ``` -------------------------------- ### Delay Tour Start with `startDelay` Prop Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/start-options.md Utilize the `startDelay` prop to postpone the tour's commencement by a specified number of milliseconds. This allows users to acclimate to the page before the tour begins. ```vue ``` -------------------------------- ### Manually Start Tour with startTour Method in Vue.js Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/create-a-tour.md Reference the VTour component using a template ref and call its `startTour` method to programmatically begin the tour. Ensure the ref is correctly assigned. ```vue ``` -------------------------------- ### Jump Options Priority Example Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/jump-options.md Demonstrates how step-specific options override global prop options. Only duration is overridden here; offset and a11y retain global values. ```typescript // Global defaults const globalJumpOptions = { duration: 1000, offset: -100, a11y: true, }; // Step overrides const steps = [ { target: '#step1', content: 'Step 1', jumpOptions: { duration: 300, // Only override duration // offset: still -100 from global // a11y: still true from global }, }, ]; ``` -------------------------------- ### Focus Management for Tour Start and Stop Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/accessibility.md This TypeScript code manages focus by storing the previously focused element before the tour starts and restoring it when the tour stops. This is crucial for maintaining user orientation and accessibility, especially when `enableA11y` is true. ```typescript let previousFocus: HTMLElement | null = null; const startTour = async () => { if (props.enableA11y && typeof document !== 'undefined') { previousFocus = document.activeElement as HTMLElement; } // ... tour starts if (props.enableA11y) { await nextTick(); _Tooltip.value?.focus(); } }; const stopTour = () => { if (props.enableA11y && previousFocus) { previousFocus.focus(); previousFocus = null; } }; ``` -------------------------------- ### Import Custom CSS File for Theming Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/css-theme.md Replace the default tour styles import with a custom CSS file import in your component's script setup. ```vue ``` -------------------------------- ### Per-Step Accessibility Labels in VTour Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/accessibility.md Example demonstrating how to set custom `ariaLabel` for individual tour steps to provide descriptive labels for screen readers. ```vue ``` -------------------------------- ### Custom Easing Function Configuration Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/jump-options.md Apply a custom easing function for smoother scroll animations by setting the `easing` property in `jump-options`. This example uses 'easeInOutCubic'. ```vue ``` -------------------------------- ### Configuring Multiple Step Placements Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/using-placement.md Demonstrates configuring multiple tour steps with different `placement` values, including the default. ```vue

Target

``` -------------------------------- ### goToStep(index) Source: https://context7.com/globalhive/vuejs-tour/llms.txt Navigates the tour directly to a specified step using its zero-based index. This method triggers the `onBefore` callback for the target step and handles scrolling. Invalid indices are ignored and a warning is logged to the console. ```APIDOC ## `goToStep(index)` ### Description Jumps directly to any step by zero-based index. Fires the step's `onBefore` callback and scrolls to the target. Invalid indices are silently ignored with a `console.warn`. ### Method Signature `goToStep(index: number): Promise` ### Parameters #### Path Parameters - **index** (number) - Required - The zero-based index of the step to navigate to. ``` -------------------------------- ### ITourStep Configuration Options Source: https://context7.com/globalhive/vuejs-tour/llms.txt Configure individual tour steps using the ITourStep interface. Required fields are 'target' and 'content'. Optional fields control placement, highlighting, backdrop, scrolling, callbacks, and accessibility. ```typescript import type { ITourStep } from '@globalhive/vuejs-tour'; const steps: ITourStep[] = [ { // Required: any valid CSS selector target: '#profile-menu', // Required: HTML string displayed inside the tooltip content: 'Your Profile
Manage account settings here.', // Tooltip placement relative to target (nanopop NanoPopPosition values) // Options: 'top', 'bottom', 'left', 'right', and variants like 'top-start', etc. placement: 'bottom', // Outline the target element with a highlight ring highlight: true, // Show a dark semi-transparent backdrop behind the tooltip backdrop: true, // Skip auto-scrolling to the target for this step noScroll: false, // Step-specific scroll animation options (overrides global jumpOptions) jumpOptions: { duration: 300, offset: -80, easing: 'easeInCubic' }, // Async callback executed BEFORE this step is shown onBefore: async () => { await someApiCall(); // tour waits for this to resolve }, // Async callback executed AFTER this step is shown onAfter: async () => { console.log('Step shown'); }, // Custom aria-label for screen readers on this step ariaLabel: 'Profile menu tour step', }, ]; ``` -------------------------------- ### Implement Per-Step Callbacks with onBefore and onAfter Source: https://context7.com/globalhive/vuejs-tour/llms.txt Define asynchronous callbacks that execute before a step is displayed ('onBefore') and after it's shown ('onAfter'). The tour waits for any Promises returned by these callbacks to resolve before proceeding. ```typescript import type { ITourStep } from '@globalhive/vuejs-tour'; const steps: ITourStep[] = [ { target: '#lazy-section', content: 'This section was loaded just for you.', onBefore: async () => { // Fetch data or perform DOM mutations before the tooltip appears await fetch('/api/load-section').then(r => r.json()); document.getElementById('lazy-section')!.style.display = 'block'; }, onAfter: async () => { // Fire analytics or trigger follow-up logic after step is shown await fetch('/api/track', { method: 'POST', body: JSON.stringify({ event: 'tour_step_viewed', target: '#lazy-section' }), }); }, }, { target: '#summary', content: 'Summary loaded dynamically.', onBefore: () => new Promise((resolve) => setTimeout(() => { // Simulate async data load with 500ms delay resolve(); }, 500) ), }, ]; ``` -------------------------------- ### Handle Tour Events Source: https://context7.com/globalhive/vuejs-tour/llms.txt Listen for tour lifecycle events: `onTourStart`, `onTourEnd`, and `onTourStep`. The `onTourStep` event provides the current zero-based step index. ```vue ``` -------------------------------- ### nextStep() and lastStep() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Provides programmatic control to advance to the next step or go back to the previous step in the tour. These methods mirror the functionality of the default 'Next' and 'Back' navigation buttons. ```APIDOC ## `nextStep()` and `lastStep()` ### Description Programmatically advance or go back one step. These are the same functions wired to the Next/Back buttons. ### Method Signatures `nextStep(): Promise` `lastStep(): Promise` ### Parameters None ``` -------------------------------- ### Enable Backdrop Per Step Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/step-using-a-backdrop.md Set the `backdrop` option to `true` within a step's configuration to enable the overlay for that specific step. ```vue ``` -------------------------------- ### Basic onBefore Event Usage Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-onbefore-event.md Use the onBefore event to execute synchronous code before a step is shown. This is suitable for simple checks or actions. ```vue ``` -------------------------------- ### ITourStep Interface Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-step-type.md Defines the structure for a single step in a tour. Each property controls a specific aspect of the step's appearance and behavior. ```APIDOC ## ITourStep Interface ### Description Defines the structure for a single step in a tour. Each property controls a specific aspect of the step's appearance and behavior. ### Properties - **target** (string) - Required - The CSS selector for the element to which the step will be attached. - **content** (string) - Required - The HTML content to display within the step. - **placement** (NanoPopPosition) - Optional - Specifies the position of the step relative to the target element (e.g., 'top', 'bottom', 'left', 'right'). - **onBefore** (() => Promise) - Optional - A callback function executed just before the step is displayed. Can be used for asynchronous operations. - **onAfter** (() => Promise) - Optional - A callback function executed immediately after the step is displayed. Can be used for asynchronous operations. - **highlight** (boolean) - Optional - If true, the target element will be visually highlighted. - **backdrop** (boolean) - Optional - If true, a backdrop will be shown behind the step, dimming the rest of the page. - **noScroll** (boolean) - Optional - If true, scrolling to the target element will be disabled. ``` -------------------------------- ### Define Tour Steps in Vue.js Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/create-a-tour.md Create an array of steps for the tour, where each step specifies a CSS selector for the target element and the content to display. ```vue ``` -------------------------------- ### Manual Navigation with nextStep() and lastStep() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Control tour progression programmatically using `nextStep()` to advance and `lastStep()` to go back. These functions mirror the behavior of the default navigation buttons. ```vue ``` -------------------------------- ### Navigate to Specific Step with goToStep Source: https://context7.com/globalhive/vuejs-tour/llms.txt Use `goToStep(index)` to jump to a specific step by its zero-based index. This method fires the `onBefore` callback and scrolls to the target. Invalid indices are ignored with a console warning. ```vue ``` -------------------------------- ### Configure Tour Progress Persistence with localStorage Source: https://context7.com/globalhive/vuejs-tour/llms.txt Control when tour progress is saved to localStorage. Options include 'never' (default), 'step' (saves current step), and 'end' (saves only on completion). The storage key is 'vjt-'. ```vue ``` -------------------------------- ### Configure Local Storage Persistence for Tours Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/multiple-tours.md Control tour progress saving using the `saveToLocalStorage` prop. Options include 'never' (default), 'step' (save after each step), and 'end' (save only on completion). Each tour's progress is isolated using its `name` prop. ```vue ``` -------------------------------- ### Override SCSS Variables for Theming Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/css-theme.md Create a SCSS file to override default tour variables, import the default theme, and then import your custom file in the component. ```scss $vjt__tooltip_color: rgb(15 23 42); $vjt__tooltip_background: rgb(241 245 249); $vjt__action_button_color: rgb(15 23 42); $vjt__action_button_color_hover: rgb(241 245 249); $vjt__action_button_background_hover: rgb(15 23 42); $vjt__action_button_border: 1px solid rgb(15 23 42); @import '@globalhive/vuejs-tour/src/style.scss'; ``` ```vue ``` -------------------------------- ### Define Text Content for a Tour Step Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/define-the-content.md Use the `content` property to set plain text for a tour step. Ensure the target element exists. ```vue ``` -------------------------------- ### Execute Code After Step Display Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-onafter-event.md Use the onAfter event to run custom logic after a step is shown. This handler is called directly after the step's content is rendered. ```vue ``` -------------------------------- ### Delay Step Execution with Promises Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-onafter-event.md Leverage the asynchronous nature of onAfter by returning a Promise. This allows you to introduce delays or wait for other asynchronous operations before the tour proceeds. ```vue ``` -------------------------------- ### Configure Local Storage Saving for VTour Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/saving-progress.md Use the `saveToLocalStorage` prop to control how tour progress is saved. Set to 'step' to save after each step, 'end' to save only upon completion (default), or 'never' to disable saving. ```vue ``` -------------------------------- ### Enable Highlight for a Step Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/step-highlight-target.md Set the `highlight` option to `true` within a step's configuration to enable the highlight effect for that specific step. ```vue ``` -------------------------------- ### Asynchronous onBefore Event with Promise Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-onbefore-event.md Leverage the onBefore event with a Promise to perform asynchronous operations, such as delaying the step display. The step will only show after the promise resolves. ```vue ``` -------------------------------- ### Define HTML Content for a Tour Step Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/define-the-content.md Use the `content` property to set HTML content for a tour step, enabling rich text formatting like bold, italics, and line breaks. Ensure the target element exists. ```vue ``` -------------------------------- ### Events: onTourStart, onTourEnd, onTourStep Source: https://context7.com/globalhive/vuejs-tour/llms.txt The VTour component emits three distinct events to signal lifecycle changes: `onTourStart` when the tour begins, `onTourEnd` when it concludes, and `onTourStep` whenever the tour advances to a new step, providing the current step's index. ```APIDOC ## Events ### Description The component emits three events. `onTourStep` carries the zero-based step index. ### Emitted Events - **`onTourStart`**: Emitted when the tour begins. - **`onTourEnd`**: Emitted when the tour is ended. - **`onTourStep`**: Emitted when the tour moves to a new step. It receives the zero-based step index as a payload. ### Event Payloads - **`onTourStep`**: `stepIndex: number` (zero-based index of the current step) ``` -------------------------------- ### ITourStep Interface Definition Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/the-step-type.md Defines the structure for a single step in a tour, including target element, content, placement, lifecycle hooks, and visual options. ```typescript export interface ITourStep { target: string; // The target element to attach the step to content: string; // The content of the step placement?: NanoPopPosition; // The placement of the step onBefore?: () => Promise; // Called before the step is shown onAfter?: () => Promise; // Called after the step is shown highlight?: boolean; // Highlight the target element backdrop?: boolean; // Show a backdrop if set noScroll?: boolean; // Disable scrolling if set } ``` -------------------------------- ### Defining Placement Types Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/using-placement.md TypeScript types for defining the possible values of the `placement` property. ```typescript type Direction = 'top' | 'left' | 'bottom' | 'right'; type Alignment = 'start' | 'middle' | 'end'; export type NanoPopPosition = `${Direction}-${Alignment}` | Direction; ``` -------------------------------- ### VueJS Tour Component Usage Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/index.md This snippet demonstrates how to import and use the VTour component in a Vue 3 application. It defines tour steps with targets, content (including HTML), and placement options. The `onTourEnd` function redirects the user upon tour completion. Configure tour behavior with props like `autoStart`, `highlight`, and `saveToLocalStorage`. ```vue ``` -------------------------------- ### Keyboard Navigation Handler Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/accessibility.md Implement this TypeScript function to handle keyboard navigation within the tour. It supports Escape to end the tour, and Right Arrow/Enter to proceed to the next step. Left Arrow navigates to the previous step if available. Ensure `tourVisible`, `enableA11y`, and `keyboardNav` are true before activation. ```typescript const onKeydown = (event: KeyboardEvent): void => { if (!tourVisible.value || !props.enableA11y || !props.keyboardNav) return; switch (event.key) { case 'Escape': endTour(); event.preventDefault(); break; case 'ArrowRight': case 'Enter': nextStep(); event.preventDefault(); break; case 'ArrowLeft': if (currentStepIndex.value > 0) { lastStep(); event.preventDefault(); } break; } }; ``` -------------------------------- ### resetTour(shouldRestart?) Source: https://context7.com/globalhive/vuejs-tour/llms.txt Clears the localStorage entry for this tour and resets the current step to 0. Optionally restarts the tour immediately. ```APIDOC ## `resetTour(shouldRestart?)` — Reset State Clears the localStorage entry for this tour and resets the current step to 0. Pass `true` to also restart the tour immediately. ### Method Signature `tour.value?.resetTour(shouldRestart?: boolean)` ### Parameters - **shouldRestart** (boolean) - Optional. If `true`, restarts the tour immediately after resetting. ### Usage Example ```vue ``` ``` -------------------------------- ### JumpOptions Interface Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/jump-options.md Defines the available configuration options for scroll animations. Customize duration, offset, callback, easing, and accessibility. ```typescript interface JumpOptions { /** Duration of scroll animation in milliseconds (default: 500) */ duration?: number; /** Vertical offset in pixels from target element (default: -100) */ offset?: number; /** Callback function to execute after scroll completes */ callback?: () => void; /** * Easing function name (default: 'easeInOutQuad') * Valid values: 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', * 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', * 'easeInQuint', 'easeOutQuint', 'easeInOutQuint' */ easing?: string; /** Whether to focus the element for accessibility (default: false) */ a11y?: boolean; } ``` -------------------------------- ### Global Jump Options Configuration Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/jump-options.md Set default jump options for all tour steps by passing an object to the `jump-options` prop. This configures the scroll animation for the entire tour. ```vue ``` -------------------------------- ### End Tour with endTour() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Terminate the tour and optionally mark it as complete in local storage by setting `saveToLocalStorage` to `'end'`. This action also emits the `onTourEnd` event. ```vue ``` -------------------------------- ### stopTour() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Immediately hides the tour and removes all highlights and backdrop without marking it as completed in localStorage. ```APIDOC ## `stopTour()` — Stop Without Completing Immediately hides the tour and removes all highlights and backdrop without marking it as completed in localStorage. ### Method Signature `tour.value?.stopTour()` ### Usage Example ```vue ``` ``` -------------------------------- ### content Slot Source: https://context7.com/globalhive/vuejs-tour/llms.txt Allows for custom rendering of the tooltip content area. This slot provides access to `currentStepIndex` and `currentStepData`, enabling dynamic and personalized content display within each tour step. ```APIDOC ## `content` Slot ### Description Replace the default HTML-rendered content area with any custom markup. Receives `currentStepIndex` (number) and `currentStepData` (ITourStep) as slot props. ### Slot Props - **`currentStepIndex`** (number): The zero-based index of the currently displayed step. - **`currentStepData`** (object): An object containing the data for the current step, including `target` and `content`. ``` -------------------------------- ### Enable Backdrop Globally Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/step-using-a-backdrop.md You can enable the highlight effect globally by setting the `backdrop` prop in the `VTour` component. This applies the backdrop to all steps unless overridden per step. ```vue
``` -------------------------------- ### Switch Between Tours Manually Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/multiple-tours.md If the prop-change watcher is disabled, call `startTour()` manually after updating the `tourSteps` and `tourName` props to switch between tours. ```vue function switchTour() { if (tourName.value === 'tour1') { tourSteps.value = tourSteps2; tourName.value = 'tour2'; } else { tourSteps.value = tourSteps1; tourName.value = 'tour1'; } vTour.value?.startTour(); // manual restart when watcher is disabled } ``` -------------------------------- ### VTour Component Props Configuration Source: https://context7.com/globalhive/vuejs-tour/llms.txt Configure the VTour component using its various props to customize tour behavior, appearance, and storage. Ensure all required props like 'steps' are provided. ```vue ``` -------------------------------- ### Enable Highlight Globally Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/step-highlight-target.md To apply the highlight effect to all steps by default, set the `highlight` prop on the `VTour` component. This avoids needing to set it for each individual step. ```vue

Target

``` -------------------------------- ### endTour() Source: https://context7.com/globalhive/vuejs-tour/llms.txt Terminates the current tour and optionally records a completion flag in local storage if `saveToLocalStorage` is configured. This method also emits the `onTourEnd` event. ```APIDOC ## `endTour()` ### Description Stops the tour and, depending on `saveToLocalStorage`, records a completion flag (`'true'`) in localStorage. Emits the `onTourEnd` event. ### Method Signature `endTour(): Promise` ### Parameters None ``` -------------------------------- ### Targeting with CSS Classes Source: https://github.com/globalhive/vuejs-tour/blob/master/docs/guide/setting-a-target.md Specify the target element for a tour step using a CSS class selector. The element in your template must have the matching class. ```vue ```