react-joyride and reactour are both React libraries designed to create interactive walkthroughs or tours for web applications. They help guide users through key features by highlighting specific elements on the page with tooltips and step-by-step instructions. react-joyride is known for its robust feature set, active maintenance, and flexibility in controlling tour flow via callbacks. reactour offers a lightweight alternative with a focus on simplicity and controlled state management, though it has seen less frequent updates in recent years compared to Joyride.
Both react-joyride and reactour solve the same core problem — guiding users through a interface with highlighted steps. However, they differ in how they manage state, handle styling, and maintain long-term support. Let's look at the technical details to help you decide.
react-joyride is installed as a standalone component. You import it and place it in your root or layout component. It does not require a context provider for basic usage.
// react-joyride: Direct import
import Joyride from 'react-joyride';
function App() {
return <Joyride steps={steps} run={true} />;
}
reactour typically requires importing the Tour component and sometimes a provider depending on the version. The original package works similarly to Joyride but often relies on global state for masking.
// reactour: Direct import
import Tour from 'reactour';
function App() {
return <Tour steps={steps} isOpen={true} />;
}
Both libraries use an array of objects to define steps, but the property names differ slightly.
react-joyride uses target (CSS selector or ref) and content. It supports placement for positioning.
// react-joyride: Step definition
const steps = [
{
target: '.my-element',
content: 'Click here to start',
placement: 'bottom',
},
];
reactour uses selector instead of target. The content is often passed as content or children.
// reactour: Step definition
const steps = [
{
selector: '.my-element',
content: 'Click here to start',
},
];
Control is critical for multi-step tours. You need to know when a user moves next or closes the tour.
react-joyride uses a callback prop to listen to events like next, prev, or end. You manage the run state externally.
// react-joyride: Controlled flow
const [run, setRun] = useState(false);
const handleCallback = (data) => {
if (data.action === 'end') {
setRun(false);
}
};
<Joyride steps={steps} run={run} callback={handleCallback} />;
reactour relies on the isOpen prop and onClose handler. It is simpler but offers less granularity on step changes.
// reactour: Controlled flow
const [isOpen, setIsOpen] = useState(true);
const handleClose = () => {
setIsOpen(false);
};
<Tour steps={steps} isOpen={isOpen} onClose={handleClose} />;
Customizing the look of the tooltip and mask is often required to match brand guidelines.
react-joyride allows passing a styles object to override internal components like the tooltip, button, or overlay.
// react-joyride: Custom styles
<Joyride
steps={steps}
styles={{
options: {
primaryColor: '#007bff',
zIndex: 1000,
},
}}
/>
reactour uses class names and a maskClassName prop to style the overlay. You often need to write custom CSS to match the theme.
// reactour: Custom styles
<Tour
steps={steps}
isOpen={true}
maskClassName="custom-mask"
className="custom-tooltip"
/>
Long-term support is a key factor for architectural decisions.
react-joyride is actively maintained with regular updates for React versions including React 18. It has a large community and many examples available.
// react-joyride: React 18 compatible
// Frequently updated to support new React features
reactour has seen slower update cycles. While stable, it may require more work to integrate with newer React features like concurrent rendering. There is a newer scoped package @reactour/tour, but the original reactour is less active.
// reactour: Maintenance check
// Check npm for latest release date before committing
| Feature | react-joyride | reactour |
|---|---|---|
| Step Prop | target | selector |
| Control | callback + run | isOpen + onClose |
| Styling | styles object | CSS classes |
| Maintenance | Active | Less Active |
| React 18 | ✅ Supported | ⚠️ Verify Version |
react-joyride is the stronger choice for most professional projects. It offers better control over the tour lifecycle, more styling options, and a clearer path for future updates. Use it when you need reliability and flexibility.
reactour is suitable for simpler use cases or legacy projects already using it. If you choose it, verify the maintenance status of the specific version you plan to install. For new development, react-joyride reduces risk.
Choose react-joyride for production-grade applications requiring complex tour flows, active maintenance, and extensive customization options. It is ideal when you need fine-grained control over step transitions, callbacks, and styling without relying on external context providers. This package is the safer bet for long-term projects due to its consistent update history.
Choose reactour if you prefer a simpler API surface and your project already depends on it, or if you need a lightweight solution for basic tooltips. It works well for straightforward tours where deep customization is not required. However, evaluate its maintenance status carefully before committing to new projects, as updates are less frequent than competitors.
Showcase your app to new users or explain the functionality of new features.
steps and you're good to gonpm i react-joyride
import { Joyride } from 'react-joyride';
const steps = [
{ target: '.my-first-step', content: 'This is my awesome feature!' },
{ target: '.my-other-step', content: 'This is another awesome feature!' },
];
export function App() {
return (
<div>
<Joyride run steps={steps} />
{/* your app */}
</div>
);
}
import { useJoyride } from 'react-joyride';
const steps = [
{ target: '.my-first-step', content: 'This is my awesome feature!' },
{ target: '.my-other-step', content: 'This is another awesome feature!' },
];
export function App() {
const { controls, state, Tour } = useJoyride({ steps });
return (
<div>
<button onClick={() => controls.start()}>Start Tour</button>
{Tour}
{/* your app */}
</div>
);
}
Enable AI assistants to implement guided tours with React Joyride.
The skill gives your AI assistant comprehensive knowledge of the API, step configuration, events, custom components, and common patterns.
npx skills add gilbarbara/react-joyride
Check the migration guide for detailed instructions on upgrading from v2.
MIT