# Tour ### Intro A bubble component used to guide the user through the product's capabilities. This component has been available since v4.0. ### Install ```js import { createApp } from 'vue' import { Tour } from '@nutui/nutui' const app = createApp() app.use(Tour) ``` ### Basic Usage At each step, set the id of the target element, and the Tour component looks up the set id value > demo: tour basic ### Custom Style Through 'mask-width', 'mask-height', 'bg-color' can be configured hollow mask size, bubble shell layer background color > demo: tour custom ### Custom Offset 'offset' sets the distance of the hollow mask relative to the target element, 'popoverOffset' sets the offset of the bubble layer > demo: tour position ### Custom Content Can customize the bubble layer through the slot slot > demo: tour content ### Steps > demo: tour step ## API ### Props | Attribute | Description | Type | Default | | --- | --- | --- | --- | | v-model | Whether to display the boot eject layer | boolean | `false` | | type | Tour type | string | `step` | | steps | Boot Step Content | StepOptions[] | `[]` | | offset | The offset of the hollow mask relative to the target element | [number, number] | `[8, 10]` | | current | When the type is' step ', the number of steps is displayed by default | number | `0` | | custom-class | Custom class | string | '' | | location | Location of popover,[location](https://nutui.jd.com/#/zh-CN/component/popover) | string | `'bottom'` | | next-step-Txt | Next step text | string | `'next'` | | prev-step-Txt | Prev step text | string | `'prev' ` | | complete-txt | Complete text | string | `'complete'` | | mask | Whether to display cutout mask | boolean | `true` | | bg-color | Custom background color | boolean | '' | | theme | Theme style, can be set to dark light,[theme](https://nutui.jd.com/#/zh-CN/component/popover) | string | `'light'` | | mask-width | Width of hollow mask | number \| string | '' | | mask-height | Hollow mask height | number \| string | '' | | close-on-click-overlay | Whether to close when clicking overlay,[closeOnClickOverlay](https://nutui.jd.com/#/zh-CN/component/popover) | boolean | `true` | | show-prev-step | Whether to show prev button | boolean | `true` | | show-title-bar | Whether to show title bar | boolean | `false` | ### StepOptions | Attribute | Description | Type | Default | | --- | --- | --- | --- | | target | target dom | id | - | | content | popover content | string | '' | | location | Location of popover,[location](https://nutui.jd.com/#/zh-CN/component/popover) | string | `'bottom'` | | popover-offset | Offset of popopver [offset](https://nutui.jd.com/#/zh-CN/component/popover) | [number, number] | `[0, 12]` | | arrow-offset | Offset of arrow [arrowOffset](https://nutui.jd.com/#/zh-CN/component/popover) | number | `0` | ### Slots | Name | Description | | --- | --- | | default | Custom popover content | | prev-step | Custom prev strep content | | next-step | Custom prev strep content | ### Events | Event | Description | | --- | --- | | change | Emit when step change | | close | Emit when popover close |