Spotlight tour
Modal coach marks with measured cutouts, explicit skip/close controls and no automatic app interaction.
npx @swipeui/cli add spotlight-tourWhen to use it
- First-run tours that highlight a few key controls with short explanations.
- Introducing a new feature by pointing at its button.
- Guided setup where each step points at the next control to use.
When not to use it
- Long tutorials; keep tours to a few steps.
- Information people need every time. Put it in the UI.
- Automating actions; the tour never taps anything for the user.
Installation
Installs with a Pro licence
Everything on this page is public except the source. Founder pre-sale opens around 5 January 2027.
Setup
Follow the two-step Spotlight Tour recipe for providers, stable target refs, explicit completion and focus restoration.
Usage
import { SpotlightTour } from '@/components/swipeui/sheet/spotlight-tour';
<SpotlightTour open={open} onOpenChange={setOpen} steps={steps} />;Steps supply stable identities and native target refs (collapsable=false). Unavailable/offscreen targets show retry/continue controls and onMissingTarget instead of blocking on an invisible target. Targets are measured on step, viewport and keyboard changes; the caller must retry after programmatic scrolling. The modal tour does not activate underlying controls. Closing is not completion; Finish is explicit.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
steps | | — | Steps in display order. |
open? | | — | Controlled visibility. |
defaultOpen? | | | Initial visibility. |
onOpenChange? | | — | Reports visibility intent. |
step? | | — | Controlled step index. |
defaultStep? | | | Initial step. |
onStepChange? | | — | Reports step intent. |
onComplete? | | — | Only invoked after Finish; closing is not completion. |
onMissingTarget? | | — | Reports unavailable/offscreen targets without logging their content. |
labels? | | — | Localized back/next/finish/close/retry labels. |
missingLabel? | | — | Missing target explanation. |
returnFocusRef? | | — | Original trigger to restore. |
motion? | | — | Shared overlay/press character. |
haptics? | | — | Press feedback. |
testID? | | — | Root identifier. |
Composition and behavior
- steps each have an id, target ref, title and description.
- Control with open, step and their change handlers.
- onComplete and onMissingTarget report outcomes.
- Uses the shared OverlayProvider; register OverlayScope inside native presentations.
Behavior and gestures
- Dims the screen and cuts out a highlight around each target, with an explanation beside it.
- Back and Next move between steps; Finish completes the tour.
- Close tour ends it at any step without counting as completed.
- If a target is missing or off screen, the step explains that and offers Try again, and the tour can still be closed.
Accessibility
- Focus moves to each step's title, read as a header.
- All controls are labelled buttons, with translatable labels.
- Reduce Transparency uses a solid background instead of a translucent dim.
- Focus returns to the original trigger when it closes.
Motion
- Uses the
overlayandpressmotion roles, so it follows your app's feel. Passmotionto tune this one instance. - Uses the overlay role; Reduce Motion fades between steps.
Performance
- Measures one target per step.
Notes for AI
- Mark each target View collapsable={false}; onComplete only fires after Finish.
Compatibility
| Runs on | Supported |
|---|---|
| Expo SDK 57 | Yes |
| Expo SDK 58 | Yes |
| React Native CLI (with Expo modules) | Yes |
| Expo Go | Yes |
| iOS | Yes |
| Android | Yes |
This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.