Skip to content

Tour

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:110

Class representing the site tour

new Tour(options?): Tour

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:128

TourOptions = {}

Tour

Evented.constructor

bindings: Bindings

Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:11

Evented.bindings


classPrefix: string

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:113


optional currentStep?: Step | null

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:114


optional focusedElBeforeOpen?: HTMLElement | null

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:115


optional id?: string

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:116


optional modal?: ShepherdModalAPI | null

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:117


options: TourOptions

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:118


steps: Step[]

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:119


trackedEvents: string[]

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:111

_setupActiveTour(): void

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:471

Make this tour “active”

void


addStep(options, index?): Step | StepOptions

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:174

Adds a new step to the tour

Step | StepOptions

An object containing step options or a Step instance

number

The optional index to insert the step at. If undefined, the step is added to the end of the array.

Step | StepOptions

The newly added step


addSteps(steps?): Tour

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:196

Add multiple steps to the tour

Step[] | StepOptions[]

The steps to add to the tour

Tour


back(): void | Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:209

Go to the previous step in the tour

void | Promise<void>


cancel(): Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:220

Calls _done() triggering the ‘cancel’ event If confirmCancel is true, will show a window.confirm before cancelling If confirmCancel is a function, will call it and wait for the return value, and only cancel when the value returned is true

Promise<void>


complete(): void

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:244

Calls _done() triggering the complete event

void


getById(id): Step | undefined

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:253

Gets the step from a given id

string | number

The id of the step to retrieve

Step | undefined

The step corresponding to the id


getCurrentStep(): Step | null | undefined

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:262

Gets the current step

Step | null | undefined


hide(): void

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:269

Hide the current step

void


isActive(): boolean

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:280

Check if the tour is active

boolean


next(): void | Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:288

Go to the next step in the tour If we are at the end, call complete

void | Promise<void>


off(event, handler?): Tour

Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:53

Removes an event listener for the given event string.

string

AnyHandler

Tour

Evented.off


on(event, handler, ctx?, once?): Tour

Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:22

Adds an event listener for the given event string.

string

AnyHandler

unknown

boolean = false

Tour

Evented.on


once(event, handler, ctx?): Tour

Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:42

Adds an event listener that only fires once for the given event string.

string

AnyHandler

unknown

Tour

Evented.once


removeStep(name): void

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:302

Removes the step from the tour

string

The id for the step to remove

void


setupModal(): void

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:480

setupModal create the modal container and instance

void


show(key?, forward?): void | Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:334

Show a specific step in the tour

string | number

The key to look up the step by

boolean = true

True if we are going forward, false if backward

void | Promise<void>

A promise when the step’s waitForElement option makes showing asynchronous, otherwise undefined


start(): Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/tour.ts:419

Start the tour

Promise<void>


trigger(event, …args): Tour

Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:78

Triggers an event listener for the given event string.

string

any[]

Tour

Evented.trigger