Token导航 LogoToken导航

Agent Skill · 开发

react-joyride(React joyride 开发)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

react-joyride 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 6,669。

总安装 4,470周安装 192GitHub Stars 7,667下载 1,567核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:react-joyride(React joyride 开发)
来源仓库:https://github.com/gilbarbara/react-joyride
仓库路径:skills/react-joyride
安装命令:
npx skills add https://github.com/gilbarbara/react-joyride --skill react-joyride
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/gilbarbara/react-joyride --skill react-joyride

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助 React 前端页面与交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 相关代码。可整理组件结构或定位布局和性能问题,提升开发效率。使用时需结合项目现有设计系统、路由和构建方式。涉及页面改动时,应配合本地预览和构建检查确认效果。

来源仓库内路径:skills/react-joyride

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/gilbarbara/react-joyride --skill react-joyride;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

react-joyride 怎么安装?

在终端执行 npx skills add https://github.com/gilbarbara/react-joyride --skill react-joyride。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

react-joyride 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

react-joyride 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

react-joyride 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

react-joyride 用的人多吗?

公开数据是累计安装 4,470 次,近一周安装 192 次,下载 1,567 次,GitHub 7,667 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

react-joyride 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 7,667 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
react-joyride

React joyride 开发 · 本页

4,4707,667需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

React Joyride v3

Create guided tours in React apps. Two public APIs: the useJoyride() hook (recommended) and the <Joyride> component.

Online docs: https://v3.react-joyride.com

Quick Start

Using the hook (recommended)

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

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 {controls, failures, on, state, step, Tour}. Render Tour in your JSX.

Docs: https://v3.react-joyride.com/docs/getting-started

Core Concepts

The tour has two state dimensions:

Tour Status: idle -> ready -> waiting -> running <-> paused -> finished | skipped

  • idle: No steps loaded
  • ready: Steps loaded, waiting for run: true
  • waiting: run=true but steps loading async (transitions to running when steps arrive)
  • running: Tour active
  • paused: Tour paused (controlled mode at COMPLETE, or stop() called)
  • finished / skipped: Tour ended

Step Lifecycle (per step): init -> ready -> beacon_before -> beacon -> tooltip_before -> tooltip -> complete

  • *_before phases: scrolling and positioning happen here
  • beacon: Pulsing indicator shown (skipped when continuous + navigating, skipBeacon, or placement: 'center')
  • tooltip: The tooltip is visible and interactive

Docs: https://v3.react-joyride.com/docs/how-it-works

Step Configuration

Each step requires target and content. All other fields are optional.

{
  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
}

Target types

// 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') }

Common step options (override per-step)

OptionDefaultDescription
placement'bottom'Tooltip position. Use 'center' for modal-style (requires target: 'body')
skipBeaconfalseSkip beacon, show tooltip directly
buttons['back','close','primary']Buttons in tooltip. Add 'skip' for skip button
hideOverlayfalseDon't show dark overlay
blockTargetInteractionfalseBlock clicks on highlighted element
before-(data) => Promise<void> — async hook before step shows
after-(data) => void — fire-and-forget hook after step completes
skipScrollfalseDon't scroll to target
scrollTarget-Scroll to this element instead of target
spotlightTarget-Highlight this element instead of target
spotlightPadding10Padding around spotlight. Number or {top, right, bottom, left}
targetWaitTimeout1000ms to wait for target to appear. 0 = no waiting
beforeTimeout5000ms to wait for before hook. 0 = no timeout

All Options fields can be set globally via options prop or per-step. Per-step values override global.

Docs: https://v3.react-joyride.com/docs/step | https://v3.react-joyride.com/docs/props/options

Uncontrolled vs Controlled

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 before hooks — the tour waits for the promise to resolve before showing the step. If a target element isn't in the DOM yet, targetWaitTimeout (default: 1000ms) handles polling for it. You do NOT need controlled mode for these cases.

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);
    }
  },
});

Controlled (with stepIndex) — use sparingly

Only 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 before/after hooks can't handle).

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:

  • go() and reset() are disabled (logged warning)
  • You must update stepIndex in response to events
  • The tour pauses at COMPLETE — you must advance it
  • Prefer uncontrolled mode with before/after hooks unless you have a strong reason for external index management

Event System

onEvent callback

onEvent: (data: EventData, controls: Controls) => void

The data object contains the full tour state plus event-specific fields. The controls object lets you programmatically control the tour.

Event types (in order per step)

EventWhen
tour:startTour begins
step:before_hookbefore hook is called
step:beforeTarget found, step about to render
scroll:startScrolling to target
scroll:endScroll complete
beaconBeacon shown
tooltipTooltip shown
step:afterUser navigated (next/prev/close/skip)
step:after_hookafter hook called
tour:endTour finished or skipped
tour:statusStatus changed (on stop/reset)
error:target_not_foundTarget element not found
errorGeneric error

Event subscription with on()

const { on, Tour } = useJoyride({ ... });

useEffect(() => {
  const unsubscribe = on('tooltip', (data, controls) => {
    analytics.track('tour_step_viewed', { step: data.index });
  });
  return unsubscribe;
}, [on]);

Docs: https://v3.react-joyride.com/docs/events

Controls

Available via useJoyride() return value or onEvent second argument:

MethodDescription
next()Advance to next step
prev()Go to previous step
close(origin?)Close current step, advance
skip(origin?)Skip the tour entirely
start(index?)Start the tour
stop(advance?)Stop (pause) the tour
go(index)Jump to step (uncontrolled only)
reset(restart?)Reset tour (uncontrolled only)
open()Open tooltip for current step
info()Get current state

Docs: https://v3.react-joyride.com/docs/hook

Styling & Theming

Three layers of customization (from simple to full control):

1. Color options (simplest)

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)
}

2. Styles override

styles: {
  tooltip: { borderRadius: 12 },
  buttonPrimary: { backgroundColor: '#1976d2' },
  buttonBack: { color: '#666' },
  spotlight: { borderRadius: 8 },
}

Style keys: arrow, beacon, beaconInner, beaconOuter, beaconWrapper, buttonBack, buttonClose, buttonPrimary, buttonSkip, floater, loader, overlay, tooltip, tooltipContainer, tooltipContent, tooltipFooter, tooltipFooterSpacer, tooltipTitle

3. Custom components (full control)

See next section.

Docs: https://v3.react-joyride.com/docs/props/styles

Custom Components

Replace any UI component via props. Each receives render props with step data and button handlers.

Custom Tooltip

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 tooltipProps on the container (sets role="dialog" and aria-modal). Spread button props (backProps, primaryProps, closeProps, skipProps) on buttons for correct action handling.

Custom Beacon

Must render a <span> (placed inside a <button> wrapper). Receives BeaconRenderProps: {continuous, index, isLastStep, size, step}.

Custom Arrow

Receives ArrowRenderProps: {base, placement, size}.

Custom Loader

Receives LoaderRenderProps: {step}. Set to null to disable the loader.

Docs: https://v3.react-joyride.com/docs/custom-components

Problem → Solution Guide

I need to...Use
Wait for async UI changes between steps (dropdown, animation, data load)before hook returning a Promise — not controlled mode
Control step navigation externally (URL sync, external state machine)Controlled mode with stepIndex — but try before/after hooks first
Track which steps failed (target missing, hook error)failures array from useJoyride() return
Listen to specific events without onEvent switchon('event:type', handler) from useJoyride() return
Show a centered modal-style steptarget: 'body' + placement: 'center'

Common Gotchas & Debugging

Use debug: true first

The debug 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.

<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.

Tour not starting

  • Check run={true} is set
  • Verify steps array is not empty and steps have valid target + content
  • For SSR: use <Joyride> component (auto-guards DOM access) or check typeof window!== 'undefined'

Target not found

  • Test selector in console: document.querySelector('.your-selector')
  • Element must be visible (not display: none, visibility: hidden, or zero dimensions)
  • If element mounts later, increase targetWaitTimeout (default: 1000ms)
  • Set targetWaitTimeout: 0 to skip waiting entirely
  • In uncontrolled mode, missing targets auto-advance; in controlled mode, handle error:target_not_found event

Tooltip never appears / overlay flashes

  • Add debug: true and check the console to see which lifecycle phase is reached
  • Verify the target element is in the viewport or scrollable
  • Check for CSS overflow: hidden on ancestors clipping the target
  • If using portals or modals, the target may not be accessible

Controlled mode stuck

  • First question: do you actually need controlled mode? Most async needs are solved with before/after hooks in uncontrolled mode
  • If controlled: you MUST update stepIndex in your onEvent handler when type === 'step:after'
  • Handle both forward (action!== 'prev') and backward (action === 'prev') navigation
  • Also handle error:target_not_found to skip broken steps
  • go() and reset() don't work in controlled mode

Before hook timeout

  • Default beforeTimeout is 5000ms — increase if your async operation takes longer
  • Set beforeTimeout: 0 for no timeout
  • The loader appears after loaderDelay (300ms) while waiting

Scroll issues

  • Use scrollTarget to scroll to a different element than the tooltip target
  • Adjust scrollOffset (default: 20px) for headers or fixed elements
  • Set skipScroll: true to disable auto-scrolling for a step
  • scrollToFirstStep: false by default — set to true if first step is off-screen

Center placement

  • Use placement: 'center' with target: 'body' for modal-style centered tooltips
  • Center placement automatically hides the beacon and arrow

Imports

// 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';

Docs: https://v3.react-joyride.com/docs/exports

Reference Files

Read these for complete API details:

  • references/api-props-options.md — Full Props, Options (all 30+ fields with defaults), Locale, FloatingOptions, Styles types
  • references/api-step-state-controls.md — Step, StepMerged, StepTarget, State, Controls (all 10 methods), UseJoyrideReturn, StepFailure
  • references/api-events-components.md — All 13 event types, ACTIONS/LIFECYCLE/STATUS/ORIGIN constants, EventData, custom component render props
  • references/patterns.md — Complete working examples: controlled mode, before/after hooks, custom tooltip, event subscription, dynamic steps

平台分布

Codex

33.71%
按下载量换算528

Claude

32.03%
按下载量换算502

Cursor

20.82%
按下载量换算326

Gemini CLI

9.94%
按下载量换算156

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills