SwipeUI

Spotlight tour

Modal coach marks with measured cutouts, explicit skip/close controls and no automatic app interaction.

npx @swipeui/cli add spotlight-tour

When 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

app/(tabs)/index.tsx
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

PropTypeDefaultDescription
stepsreadonly SpotlightTourStep[]—

Steps in display order.

open?boolean—

Controlled visibility.

defaultOpen?booleanfalse

Initial visibility.

onOpenChange?((open: boolean) => void)—

Reports visibility intent.

step?number—

Controlled step index.

defaultStep?number0

Initial step.

onStepChange?((step: number) => void)—

Reports step intent.

onComplete?(() => void)—

Only invoked after Finish; closing is not completion.

onMissingTarget?((id: string) => void)—

Reports unavailable/offscreen targets without logging their content.

labels?readonly [string, string, string, string, string]—

Localized back/next/finish/close/retry labels.

missingLabel?string—

Missing target explanation.

returnFocusRef?OverlayFocusRef—

Original trigger to restore.

motion?MotionOverride—

Shared overlay/press character.

haptics?boolean—

Press feedback.

testID?string—

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 overlay and press motion roles, so it follows your app's feel. Pass motion to 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 onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items