Preview Updated 2026-05-10

Tour

Step-by-step highlight of key UI elements with explanation popovers. Use it to onboard users when shipping new features.

Basic usage

Each entry in steps is { target, title, description, placement }. target is a CSS selector for the element to highlight; placement is the popover side relative to the target.

<CfTour v-model="open" :steps="steps" />
<CfTour open={open} onOpenChange={setOpen} steps={steps} />

API

PropTypeDefaultDescription
stepsTourStep[]Tour steps
open / modelValuebooleanControlled visibility
defaultOpen / defaultValuebooleanfalseUncontrolled initial visibility
currentnumberControlled current step index
defaultCurrentnumber0Uncontrolled initial step

Events: onOpenChange(open) / onCurrentChange(n) / onFinish() / onClose().

TourStep

FieldTypeDescription
targetstringCSS selector to locate the highlight target
titlestringPopover title
descriptionstringPopover description (optional)
placement'top' | 'bottom' | 'left' | 'right'Popover side relative to target, default 'bottom'

反馈与讨论

Tour · Discussion

0
0 / 600
一键发送
正在加载评论...