svelte-tourlight GitHub

Analytics

One onEvent stream covers start, step, complete, skip, stop, target-missing, highlight and error. A step event fires once per step, only after its target was found.

Live event log

No events yet. Events from every demo on this site land here.

Callbacks
<SpotlightProvider
  onEvent={(e) => analytics.track('tour_' + e.type, e)}
  onStepChange={(tourId, index, step) => console.log(tourId, index, step.id)}
  onComplete={(tourId) => markDone(tourId)}
  onSkip={(tourId, index) => markSkipped(tourId, index)}
>

// e.type: 'start' | 'step' | 'complete' | 'skip' | 'stop'
//       | 'target-missing' | 'highlight' | 'error'