Options
Options control theming, behavior, and timing. Set them globally via the options prop, or override per-step.
<Joyride
options={{
primaryColor: '#e91e63',
hideOverlay: true,
scrollDuration: 500,
}}
steps={[
{
target: '.my-element',
content: 'Hello!',
// Per-step override:
hideOverlay: false,
},
]}
/>defaults → options prop → step fields
Appearance
| Option | Type | Default |
|---|---|---|
backgroundColor Tooltip background color. | string | #ffffff |
buttons Buttons to show in the tooltip. An empty array hides all buttons (footer and close). | ButtonType[] | ["back", "close", "primary"] |
offset Distance in pixels between the tooltip and the target. | number | 10 |
primaryColor Primary button and beacon color. | string | #000000 |
showProgress Show progress in the next button (e.g., | boolean | false |
textColor Tooltip text color. | string | #000000 |
width Tooltip width in pixels or CSS string. | string | number | 380 |
zIndex z-index for the overlay and tooltip. | number | 100 |
Arrow
| Option | Type | Default |
|---|---|---|
arrowBase Width of the arrow base edge in pixels. | number | 32 |
arrowColor Arrow fill color. | string | #ffffff |
arrowSize Height/depth of the arrow (tip to base) in pixels. | number | 16 |
arrowSpacing Distance between the arrow and the tooltip edge. | number | 12 |
Beacon
| Option | Type | Default |
|---|---|---|
beaconSize Beacon diameter in pixels. | number | 36 |
beaconTrigger Interaction that opens the tooltip. | 'click' | 'hover' | click |
skipBeacon Don't show the Beacon before the tooltip. | boolean | false |
Overlay & Spotlight
| Option | Type | Default |
|---|---|---|
hideOverlay Don't show the overlay. | boolean | false |
overlayColor Overlay backdrop color. | string | #00000080 |
spotlightPadding Spotlight padding around the target. Accepts a number for all sides, or a | number | SpotlightPadding | 10 |
spotlightRadius Border radius of the spotlight cutout in pixels. | number | 4 |
Interactions
| Option | Type | Default |
|---|---|---|
blockTargetInteraction Block pointer events on the highlighted element. | boolean | false |
closeButtonAction Action when the close button is clicked.
| 'close' | 'skip' | close |
disableFocusTrap Disable the focus trap for the tooltip. | boolean | false |
dismissKeyAction Action when the ESC key is pressed.
| 'close' | 'next' | false | close |
overlayClickAction Action when the overlay is clicked.
| 'close' | 'next' | false | close |
Scrolling
| Option | Type | Default |
|---|---|---|
scrollDuration Scroll animation duration in milliseconds. | number | 300 |
scrollOffset Scroll distance from the element scrollTop value. | number | 20 |
skipScroll Disable scrolling to the target. | boolean | false |
Timing & Async
The Basic Tour demo uses before and after hooks.
The Modal demo shows conditional before hooks with delays.
| Option | Type | Default |
|---|---|---|
before Async hook that runs before the step. The tour waits for the promise to resolve and shows the loader (after | (data: TourData) => Promise<void> | -- |
after Hook that runs after the step completes. Fire-and-forget — does not block the tour. | (data: TourData) => void | -- |
beforeTimeout Max wait time (ms) for a | number | 5000 |
loaderDelay Delay (ms) before showing the loader while the tour is waiting. | number | 300 |
targetWaitTimeout Max wait time (ms) for the target element to appear. | number | 1000 |