Skip to content

Step

Defined in: step.ts:574

A class representing steps to be added to a tour.

new Step(tour, options?): Step

Defined in: step.ts:618

Tour

StepOptions = {}

Step

Evented.constructor

bindings: Bindings

Defined in: evented.ts:23

The handlers registered through on and once.

Evented.bindings


optional classPrefix?: string

Defined in: step.ts:588

The tour’s classPrefix, ending in -.


cleanup: Function | null

Defined in: step.ts:592

Stops keeping the step positioned. Set while the step is rendered.


optional el?: HTMLElement | null

Defined in: step.ts:596

The step’s element. Prefer getElement().


id: string

Defined in: step.ts:600

The step’s id option, or a generated one.


options: StepOptions

Defined in: step.ts:604

The step’s options, merged with the tour’s defaultStepOptions.


optional shepherdElementComponent?: ShepherdElementResult

Defined in: step.ts:608

The step’s rendered element and its teardown.


optional target?: HTMLElement | null

Defined in: step.ts:612

The element the step attached to. Prefer getTarget().


tour: Tour

Defined in: step.ts:616

The tour the step belongs to.

cancel(): void

Defined in: step.ts:643

Cancel the tour Triggers the cancel event

void


complete(): void

Defined in: step.ts:652

Complete the tour Triggers the complete event

void


destroy(): void

Defined in: step.ts:661

Remove the step, delete the step’s element, and stop repositioning it. Triggers destroy event

void


getElement(): HTMLElement | null | undefined

Defined in: step.ts:805

Returns the element for the step

HTMLElement | null | undefined

The element instance. undefined if it has never been shown, null if it has been destroyed


getTarget(): HTMLElement | null | undefined

Defined in: step.ts:813

Returns the target for the step

HTMLElement | null | undefined

The element instance. undefined if it has never been shown, null if query string has not been found


getTour(): Tour

Defined in: step.ts:692

Returns the tour for the step

Tour

The tour instance


hide(): void

Defined in: step.ts:699

Hide the step

void


isOpen(): boolean

Defined in: step.ts:750

Check if the step is open and visible

boolean

True if the step is open and visible


off(event, handler?): Step

Defined in: evented.ts:64

Removes an event listener for the given event string.

string

AnyHandler

Step

Evented.off


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

Defined in: evented.ts:34

Adds an event listener for the given event string.

string

AnyHandler

unknown

boolean = false

Step

Evented.on


once(event, handler, ctx?): Step

Defined in: evented.ts:53

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

string

AnyHandler

unknown

Step

Evented.once


show(): Promise<void>

Defined in: step.ts:758

Wraps _show and ensures beforeShowPromise resolves before calling show. The step is not shown if the tour moved on or ended while it was pending.

Promise<void>


trigger(event, …args): Step

Defined in: evented.ts:87

Triggers an event listener for the given event string.

string

…any[]

Step

Evented.trigger


updateStepOptions(options): void

Defined in: step.ts:785

Updates the options of the step. positionOptions combines key by key with the current ones, and classes with the tour’s default classes, as when the step was created.

StepOptions

The options for the step

void