react-joyride
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReact Joyride v3
React Joyride v3
Create guided tours in React apps. Two public APIs: the hook (recommended) and the component.
useJoyride()<Joyride>Online docs: https://v3.react-joyride.com
用于在React应用中创建引导式导览。提供两个公开API: hook(推荐使用)和 组件。
useJoyride()<Joyride>Quick Start
快速开始
Using the hook (recommended)
使用hook(推荐)
tsx
import { useJoyride, STATUS, Status } from 'react-joyride';
function App() {
const { Tour } = useJoyride({
continuous: true,
run: true,
steps: [
{ target: '.my-element', content: 'This is the first step', title: 'Welcome' },
{ target: '#sidebar', content: 'Navigate here', placement: 'right' },
],
onEvent: (data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
// Tour ended
}
},
});
return <div>{Tour}{/* rest of app */}</div>;
}tsx
import { useJoyride, STATUS, Status } from 'react-joyride';
function App() {
const { Tour } = useJoyride({
continuous: true,
run: true,
steps: [
{ target: '.my-element', content: 'This is the first step', title: 'Welcome' },
{ target: '#sidebar', content: 'Navigate here', placement: 'right' },
],
onEvent: (data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
// Tour ended
}
},
});
return <div>{Tour}{/* rest of app */}</div>;
}Using the component
使用组件
tsx
import { Joyride, STATUS, Status } from 'react-joyride';
function App() {
return (
<Joyride
continuous
run={true}
steps={[
{ target: '.my-element', content: 'First step' },
{ target: '#sidebar', content: 'Second step' },
]}
onEvent={(data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
// Tour ended
}
}}
/>
);
}The hook returns . Render in your JSX.
{ controls, failures, on, state, step, Tour }Tourtsx
import { Joyride, STATUS, Status } from 'react-joyride';
function App() {
return (
<Joyride
continuous
run={true}
steps={[
{ target: '.my-element', content: 'First step' },
{ target: '#sidebar', content: 'Second step' },
]}
onEvent={(data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
// Tour ended
}
}}
/>
);
}hook返回值包含,你需要在JSX中渲染组件。
{ controls, failures, on, state, step, Tour }TourCore Concepts
核心概念
The tour has two state dimensions:
Tour Status:
idle -> ready -> waiting -> running <-> paused -> finished | skipped- : No steps loaded
idle - : Steps loaded, waiting for
readyrun: true - :
waitingbut steps loading async (transitions to running when steps arrive)run=true - : Tour active
running - : Tour paused (controlled mode at COMPLETE, or
pausedcalled)stop() - /
finished: Tour endedskipped
Step Lifecycle (per step):
init -> ready -> beacon_before -> beacon -> tooltip_before -> tooltip -> complete- phases: scrolling and positioning happen here
*_before - : Pulsing indicator shown (skipped when
beacon+ navigating,continuous, orskipBeacon)placement: 'center' - : The tooltip is visible and interactive
tooltip
导览包含两个状态维度:
导览状态:
idle -> ready -> waiting -> running <-> paused -> finished | skipped- :没有加载任何步骤
idle - :步骤加载完成,等待
ready触发run: true - :
waiting但步骤正在异步加载,步骤加载完成后会切换到running状态run=true - :导览正在运行
running - :导览已暂停(受控模式下步骤完成时,或是调用了
paused方法)stop() - /
finished:导览已结束skipped
步骤生命周期(每个步骤单独执行):
init -> ready -> beacon_before -> beacon -> tooltip_before -> tooltip -> complete- 阶段:会在这个阶段执行滚动和定位操作
*_before - :展示脉冲指示器(如果开启
beacon且正在跳转步骤、设置了continuous,或是skipBeacon时会跳过该阶段)placement: 'center' - :工具提示可见且可交互
tooltip
Step Configuration
步骤配置
Each step requires and . All other fields are optional.
targetcontenttsx
{
target: '.my-element', // CSS selector, HTMLElement, React ref, or () => HTMLElement
content: 'Step body text', // ReactNode
title: 'Optional title', // ReactNode
placement: 'bottom', // Default. Also: top, left, right, *-start, *-end, auto, center
id: 'unique-id', // Optional identifier
data: { custom: 'data' }, // Attached to event callbacks
}每个步骤都需要设置和,其余字段都是可选的。
targetcontenttsx
{
target: '.my-element', // CSS选择器、HTMLElement、React ref,或是返回HTMLElement的函数
content: 'Step body text', // ReactNode类型
title: 'Optional title', // ReactNode类型
placement: 'bottom', // 默认值,可选值:top、left、right、*-start、*-end、auto、center
id: 'unique-id', // 可选标识符
data: { custom: 'data' }, // 挂载到事件回调上的自定义数据
}Target types
Target类型
tsx
// CSS selector
{ target: '.sidebar-nav' }
// HTMLElement
{ target: document.getElementById('my-el') }
// React ref
const ref = useRef(null);
{ target: ref }
// Function (evaluated each lifecycle)
{ target: () => document.querySelector('.dynamic-element') }tsx
// CSS选择器
{ target: '.sidebar-nav' }
// HTMLElement
{ target: document.getElementById('my-el') }
// React ref
const ref = useRef(null);
{ target: ref }
// 函数(每次生命周期执行时都会重新计算)
{ target: () => document.querySelector('.dynamic-element') }Common step options (override per-step)
常用步骤配置项(可按步骤单独覆盖全局配置)
| Option | Default | Description |
|---|---|---|
| | Tooltip position. Use |
| | Skip beacon, show tooltip directly |
| | Buttons in tooltip. Add |
| | Don't show dark overlay |
| | Block clicks on highlighted element |
| - | |
| - | |
| | Don't scroll to target |
| - | Scroll to this element instead of |
| - | Highlight this element instead of |
| | Padding around spotlight. Number or |
| | ms to wait for target to appear. |
| | ms to wait for |
All fields can be set globally via prop or per-step. Per-step values override global.
Optionsoptions| 配置项 | 默认值 | 说明 |
|---|---|---|
| | 工具提示位置,设置 |
| | 跳过beacon展示,直接显示工具提示 |
| | 工具提示内的按钮,添加 |
| | 不展示深色背景遮罩 |
| | 阻止用户点击高亮的目标元素 |
| - | |
| - | |
| | 不自动滚动到目标元素位置 |
| - | 滚动到该元素而非 |
| - | 高亮该元素而非 |
| | 高亮区域的内边距,可传入数字或是 |
| | 等待目标元素出现的毫秒数,设置 |
| | 等待 |
所有配置项都可以通过prop全局设置,或是按步骤单独设置,单步设置的优先级高于全局配置。
optionsUncontrolled vs Controlled
非受控模式 vs 受控模式
Uncontrolled (default — strongly preferred)
非受控模式(默认,强烈推荐)
The tour manages step navigation internally. This is the right choice for most use cases.
The library handles async transitions for you. If a step needs to wait for a UI change (dropdown opening, data loading, animation), use hooks — the tour waits for the promise to resolve before showing the step. If a target element isn't in the DOM yet, (default: 1000ms) handles polling for it. You do NOT need controlled mode for these cases.
beforetargetWaitTimeouttsx
const { Tour } = useJoyride({
continuous: true,
run: isRunning,
steps: [
{ target: '.nav', content: 'Navigation' },
{
target: '.dropdown-item',
content: 'Inside the dropdown',
before: () => {
// Open dropdown and wait for animation — tour waits automatically
openDropdown();
return new Promise(resolve => setTimeout(resolve, 300));
},
after: () => closeDropdown(), // Clean up after step (fire-and-forget)
},
{ target: '.main-content', content: 'Main content' },
],
onEvent: (data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
setIsRunning(false);
}
},
});导览内部自动管理步骤跳转,绝大多数场景下都是最优选择。
库会自动处理异步过渡。如果某个步骤需要等待UI变化(比如下拉框展开、数据加载、动画执行),可以使用钩子,导览会自动等待Promise resolve后再展示步骤。如果目标元素还没有挂载到DOM上,(默认1000ms)会自动轮询查找目标元素,这些场景你都不需要使用受控模式。
beforetargetWaitTimeouttsx
const { Tour } = useJoyride({
continuous: true,
run: isRunning,
steps: [
{ target: '.nav', content: 'Navigation' },
{
target: '.dropdown-item',
content: 'Inside the dropdown',
before: () => {
// 展开下拉框并等待动画执行完成,导览会自动等待
openDropdown();
return new Promise(resolve => setTimeout(resolve, 300));
},
after: () => closeDropdown(), // 步骤完成后清理,无需等待执行完成
},
{ target: '.main-content', content: 'Main content' },
],
onEvent: (data) => {
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(data.status)) {
setIsRunning(false);
}
},
});Controlled (with stepIndex
) — use sparingly
stepIndex受控模式(搭配stepIndex
使用):谨慎使用
stepIndexOnly use controlled mode when the parent genuinely needs to manage the step index externally (e.g., syncing with URL params, external state machines, or complex multi-component coordination that / hooks can't handle).
beforeaftertsx
const [stepIndex, setStepIndex] = useState(0);
const [run, setRun] = useState(true);
const { Tour } = useJoyride({
continuous: true,
run,
stepIndex, // This makes it controlled
steps,
onEvent: (data) => {
const { action, index, status, type } = data;
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(status)) {
setRun(false);
return;
}
if (type === 'step:after' || type === 'error:target_not_found') {
setStepIndex(index + (action === 'prev' ? -1 : 1));
}
},
});Controlled mode rules:
- and
go()are disabled (logged warning)reset() - You must update in response to events
stepIndex - The tour pauses at COMPLETE — you must advance it
- Prefer uncontrolled mode with /
beforehooks unless you have a strong reason for external index managementafter
仅当父组件确实需要外部管理步骤索引时才使用受控模式(比如和URL参数同步、对接外部状态机,或是/钩子无法满足的复杂多组件协同场景)。
beforeaftertsx
const [stepIndex, setStepIndex] = useState(0);
const [run, setRun] = useState(true);
const { Tour } = useJoyride({
continuous: true,
run,
stepIndex, // 该配置项会开启受控模式
steps,
onEvent: (data) => {
const { action, index, status, type } = data;
if (([STATUS.FINISHED, STATUS.SKIPPED] as Status).includes(status)) {
setRun(false);
return;
}
if (type === 'step:after' || type === 'error:target_not_found') {
setStepIndex(index + (action === 'prev' ? -1 : 1));
}
},
});受控模式使用规则:
- 和
go()方法会被禁用(会输出警告日志)reset() - 你必须在事件回调中主动更新
stepIndex - 导览会在步骤完成时暂停,你必须主动推进步骤
- 除非你有明确的外部管理索引的需求,否则优先使用搭配/
before钩子的非受控模式after
Event System
事件系统
onEvent
callback
onEventonEvent
回调
onEventtsx
onEvent: (data: EventData, controls: Controls) => voidThe object contains the full tour state plus event-specific fields. The object lets you programmatically control the tour.
datacontrolstsx
onEvent: (data: EventData, controls: Controls) => voiddatacontrolsEvent types (in order per step)
事件类型(按每个步骤的触发顺序排列)
| Event | When |
|---|---|
| Tour begins |
| |
| Target found, step about to render |
| Scrolling to target |
| Scroll complete |
| Beacon shown |
| Tooltip shown |
| User navigated (next/prev/close/skip) |
| |
| Tour finished or skipped |
| Status changed (on stop/reset) |
| Target element not found |
| Generic error |
| 事件 | 触发时机 |
|---|---|
| 导览开始时 |
| |
| 找到目标元素,即将渲染步骤时 |
| 开始滚动到目标元素时 |
| 滚动完成时 |
| beacon展示时 |
| 工具提示展示时 |
| 用户触发跳转(下一步/上一步/关闭/跳过)时 |
| |
| 导览完成或被跳过时 |
| 导览状态变化时(调用stop/reset时触发) |
| 找不到目标元素时 |
| 通用错误触发时 |
Event subscription with on()
on()使用on()
订阅事件
on()tsx
const { on, Tour } = useJoyride({ ... });
useEffect(() => {
const unsubscribe = on('tooltip', (data, controls) => {
analytics.track('tour_step_viewed', { step: data.index });
});
return unsubscribe;
}, [on]);tsx
const { on, Tour } = useJoyride({ ... });
useEffect(() => {
const unsubscribe = on('tooltip', (data, controls) => {
analytics.track('tour_step_viewed', { step: data.index });
});
return unsubscribe;
}, [on]);Controls
控制方法
Available via return value or second argument:
useJoyride()onEvent| Method | Description |
|---|---|
| Advance to next step |
| Go to previous step |
| Close current step, advance |
| Skip the tour entirely |
| Start the tour |
| Stop (pause) the tour |
| Jump to step (uncontrolled only) |
| Reset tour (uncontrolled only) |
| Open tooltip for current step |
| Get current state |
可以通过的返回值或是的第二个参数获取控制方法:
useJoyride()onEvent| 方法 | 说明 |
|---|---|
| 前进到下一步 |
| 回退到上一步 |
| 关闭当前步骤,继续推进导览 |
| 直接跳过整个导览 |
| 启动导览 |
| 停止(暂停)导览 |
| 跳转到指定步骤(仅非受控模式可用) |
| 重置导览(仅非受控模式可用) |
| 打开当前步骤的工具提示 |
| 获取当前导览状态 |
Styling & Theming
样式与主题
Three layers of customization (from simple to full control):
提供三层自定义能力(从简单到完全可控):
1. Color options (simplest)
1. 颜色配置(最简单)
tsx
options: {
primaryColor: '#1976d2', // Buttons and beacon
backgroundColor: '#1a1a2e', // Tooltip background
textColor: '#ffffff', // Tooltip text
overlayColor: 'rgba(0,0,0,0.7)', // Overlay backdrop
arrowColor: '#1a1a2e', // Arrow (match background)
}tsx
options: {
primaryColor: '#1976d2', // 按钮和beacon的颜色
backgroundColor: '#1a1a2e', // 工具提示背景色
textColor: '#ffffff', // 工具提示文字颜色
overlayColor: 'rgba(0,0,0,0.7)', // 背景遮罩颜色
arrowColor: '#1a1a2e', // 箭头颜色(建议和背景色保持一致)
}2. Styles override
2. 样式覆盖
tsx
styles: {
tooltip: { borderRadius: 12 },
buttonPrimary: { backgroundColor: '#1976d2' },
buttonBack: { color: '#666' },
spotlight: { borderRadius: 8 },
}Style keys: , , , , , , , , , , , , , , , , ,
arrowbeaconbeaconInnerbeaconOuterbeaconWrapperbuttonBackbuttonClosebuttonPrimarybuttonSkipfloaterloaderoverlaytooltiptooltipContainertooltipContenttooltipFootertooltipFooterSpacertooltipTitletsx
styles: {
tooltip: { borderRadius: 12 },
buttonPrimary: { backgroundColor: '#1976d2' },
buttonBack: { color: '#666' },
spotlight: { borderRadius: 8 },
}可配置的样式key:, , , , , , , , , , , , , , , , ,
arrowbeaconbeaconInnerbeaconOuterbeaconWrapperbuttonBackbuttonClosebuttonPrimarybuttonSkipfloaterloaderoverlaytooltiptooltipContainertooltipContenttooltipFootertooltipFooterSpacertooltipTitle3. Custom components (full control)
3. 自定义组件(完全可控)
See next section.
参考下一节内容。
Custom Components
自定义组件
Replace any UI component via props. Each receives render props with step data and button handlers.
可以通过prop替换任意UI组件,每个组件都会收到包含步骤数据和按钮处理函数的render prop。
Custom Tooltip
自定义工具提示
tsx
import type { TooltipRenderProps } from 'react-joyride';
function MyTooltip({ backProps, index, primaryProps, size, skipProps, step, tooltipProps }: TooltipRenderProps) {
return (
<div {...tooltipProps} style={{ background: '#fff', padding: 16, borderRadius: 8, width: step.width }}>
{step.title && <h3>{step.title}</h3>}
<div>{step.content}</div>
<div>
{index > 0 && <button {...backProps}>Back</button>}
<button {...primaryProps}>Next</button>
</div>
</div>
);
}
// Usage
<Joyride tooltipComponent={MyTooltip} ... />Important: Spread on the container (sets and ). Spread button props (, , , ) on buttons for correct action handling.
tooltipPropsrole="dialog"aria-modalbackPropsprimaryPropsclosePropsskipPropstsx
import type { TooltipRenderProps } from 'react-joyride';
function MyTooltip({ backProps, index, primaryProps, size, skipProps, step, tooltipProps }: TooltipRenderProps) {
return (
<div {...tooltipProps} style={{ background: '#fff', padding: 16, borderRadius: 8, width: step.width }}>
{step.title && <h3>{step.title}</h3>}
<div>{step.content}</div>
<div>
{index > 0 && <button {...backProps}>Back</button>}
<button {...primaryProps}>Next</button>
</div>
</div>
);
}
// 使用方式
<Joyride tooltipComponent={MyTooltip} ... />重要提示:将展开到容器元素上(会自动设置和属性),将按钮相关prop(, , , )展开到对应按钮上,保证事件处理逻辑正常生效。
tooltipPropsrole="dialog"aria-modalbackPropsprimaryPropsclosePropsskipPropsCustom Beacon
自定义Beacon
Must render a (placed inside a wrapper). Receives : .
<span><button>BeaconRenderProps{ continuous, index, isLastStep, size, step }必须渲染一个(会被包裹在容器内),接收的参数:。
<span><button>BeaconRenderProps{ continuous, index, isLastStep, size, step }Custom Arrow
自定义箭头
Receives : .
ArrowRenderProps{ base, placement, size }接收的参数:。
ArrowRenderProps{ base, placement, size }Custom Loader
自定义加载器
Receives : . Set to to disable the loader.
LoaderRenderProps{ step }null接收的参数:,设置为可禁用加载器。
LoaderRenderProps{ step }nullProblem → Solution Guide
问题解决方案指南
| I need to... | Use |
|---|---|
| Wait for async UI changes between steps (dropdown, animation, data load) | |
| Control step navigation externally (URL sync, external state machine) | Controlled mode with |
| Track which steps failed (target missing, hook error) | |
Listen to specific events without | |
| Show a centered modal-style step | |
| 需求 | 实现方案 |
|---|---|
| 在步骤之间等待异步UI变化(下拉框、动画、数据加载) | 使用返回Promise的 |
| 外部控制步骤跳转(URL同步、外部状态机) | 使用搭配 |
| 追踪哪些步骤执行失败(目标缺失、钩子错误) | 使用 |
不需要通过 | 使用 |
| 展示居中的模态框样式步骤 | 搭配 |
Common Gotchas & Debugging
常见问题与调试
Use debug: true
first
debug: true优先使用debug: true
debug: trueThe prop is the most powerful troubleshooting tool. It logs detailed lifecycle transitions, state changes, and event emissions to the console. Always start here when something isn't working.
debugtsx
<Joyride debug={true} ... />
// or
useJoyride({ debug: true, ... })The console output shows exactly which lifecycle phase the tour reaches, what actions are firing, and where it gets stuck.
debugtsx
<Joyride debug={true} ... />
// 或是
useJoyride({ debug: true, ... })控制台输出会清晰展示导览运行到了哪个生命周期阶段、触发了哪些操作、卡在哪一个环节。
Tour not starting
导览没有启动
- Check is set
run={true} - Verify array is not empty and steps have valid
steps+targetcontent - For SSR: use component (auto-guards DOM access) or check
<Joyride>typeof window !== 'undefined'
- 检查是否设置了
run={true} - 确认数组不为空,且每个步骤都包含有效的
steps和targetcontent - 服务端渲染场景:使用组件(会自动处理DOM访问的安全判断),或是手动判断
<Joyride>typeof window !== 'undefined'
Target not found
找不到目标元素
- Test selector in console:
document.querySelector('.your-selector') - Element must be visible (not ,
display: none, or zero dimensions)visibility: hidden - If element mounts later, increase (default: 1000ms)
targetWaitTimeout - Set to skip waiting entirely
targetWaitTimeout: 0 - In uncontrolled mode, missing targets auto-advance; in controlled mode, handle event
error:target_not_found
- 在控制台测试选择器是否有效:
document.querySelector('.your-selector') - 元素必须是可见的(不能是、
display: none,或是宽高为0)visibility: hidden - 如果元素是后挂载的,可以增大(默认1000ms)
targetWaitTimeout - 设置可以完全跳过等待
targetWaitTimeout: 0 - 非受控模式下,缺失的目标会自动跳过并推进到下一步;受控模式下需要手动处理事件
error:target_not_found
Tooltip never appears / overlay flashes
工具提示始终不显示 / 遮罩闪烁
- Add and check the console to see which lifecycle phase is reached
debug: true - Verify the target element is in the viewport or scrollable
- Check for CSS on ancestors clipping the target
overflow: hidden - If using portals or modals, the target may not be accessible
- 开启,查看控制台输出确认导览运行到了哪个生命周期阶段
debug: true - 确认目标元素在视口内或是可滚动到可见区域
- 检查祖先元素是否设置了裁剪了目标元素
overflow: hidden - 如果使用了portal或是模态框,可能目标元素无法被正常访问
Controlled mode stuck
受控模式卡住
- First question: do you actually need controlled mode? Most async needs are solved with /
beforehooks in uncontrolled modeafter - If controlled: you MUST update in your
stepIndexhandler whenonEventtype === 'step:after' - Handle both forward () and backward (
action !== 'prev') navigationaction === 'prev' - Also handle to skip broken steps
error:target_not_found - and
go()don't work in controlled modereset()
- 首先确认你是否真的需要受控模式,绝大多数异步需求都可以通过非受控模式的/
before钩子解决after - 如果确实使用受控模式:你必须在回调中监听
onEvent事件,并主动更新type === 'step:after'stepIndex - 同时处理向前()和向后(
action !== 'prev')的跳转逻辑action === 'prev' - 也要处理事件跳过异常步骤
error:target_not_found - 受控模式下和
go()方法不会生效reset()
Before hook timeout
Before钩子超时
- Default is 5000ms — increase if your async operation takes longer
beforeTimeout - Set for no timeout
beforeTimeout: 0 - The loader appears after (300ms) while waiting
loaderDelay
- 默认是5000ms,如果你的异步操作耗时更长可以增大该值
beforeTimeout - 设置可以不设置超时
beforeTimeout: 0 - 等待过程中加载器会在(默认300ms)后展示
loaderDelay
Scroll issues
滚动异常
- Use to scroll to a different element than the tooltip target
scrollTarget - Adjust (default: 20px) for headers or fixed elements
scrollOffset - Set to disable auto-scrolling for a step
skipScroll: true - by default — set to
scrollToFirstStep: falseif first step is off-screentrue
- 使用配置滚动到和工具提示目标不同的元素
scrollTarget - 调整(默认20px)适配固定头部或固定元素
scrollOffset - 针对单个步骤设置禁用自动滚动
skipScroll: true - 默认,如果第一个步骤不在视口内可以设置为
scrollToFirstStep: falsetrue
Center placement
居中布局
- Use with
placement: 'center'for modal-style centered tooltipstarget: 'body' - Center placement automatically hides the beacon and arrow
- 搭配和
target: 'body'实现模态框样式的居中工具提示placement: 'center' - 居中布局会自动隐藏beacon和箭头
Imports
导入说明
tsx
// Named exports only (no default export in v3)
import { Joyride, useJoyride } from 'react-joyride';
// Constants for type-safe comparisons
import { ACTIONS, EVENTS, LIFECYCLE, ORIGIN, STATUS } from 'react-joyride';
// Types
import type { Step, Props, EventData, Controls, TooltipRenderProps } from 'react-joyride';tsx
// v3仅支持命名导出,没有默认导出
import { Joyride, useJoyride } from 'react-joyride';
// 类型安全对比用的常量
import { ACTIONS, EVENTS, LIFECYCLE, ORIGIN, STATUS } from 'react-joyride';
// 类型定义
import type { Step, Props, EventData, Controls, TooltipRenderProps } from 'react-joyride';Reference Files
参考文件
Read these for complete API details:
- — Full Props, Options (all 30+ fields with defaults), Locale, FloatingOptions, Styles types
references/api-props-options.md - — Step, StepMerged, StepTarget, State, Controls (all 10 methods), UseJoyrideReturn, StepFailure
references/api-step-state-controls.md - — All 13 event types, ACTIONS/LIFECYCLE/STATUS/ORIGIN constants, EventData, custom component render props
references/api-events-components.md - — Complete working examples: controlled mode, before/after hooks, custom tooltip, event subscription, dynamic steps
references/patterns.md
阅读以下文件获取完整API详情:
- — 完整Props、Options(所有30+字段及默认值)、Locale、FloatingOptions、Styles类型定义
references/api-props-options.md - — Step、StepMerged、StepTarget、State、Controls(所有10个方法)、UseJoyrideReturn、StepFailure类型定义
references/api-step-state-controls.md - — 所有13种事件类型、ACTIONS/LIFECYCLE/STATUS/ORIGIN常量、EventData、自定义组件render prop定义
references/api-events-components.md - — 完整可运行示例:受控模式、before/after钩子、自定义工具提示、事件订阅、动态步骤
references/patterns.md