Skip to content

Step

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:428

A class representing steps to be added to a tour.

new Step(tour, options?): Step

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:442

Tour

StepOptions = {}

Step

Evented.constructor

optional _advanceOnCleanup?: (() => void) | null

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:429


_originalTabIndexes: Map<Element, string>

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:432


_resolvedAttachTo: StepOptionsAttachTo | null

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:430


optional _resolvedExtraHighlightElements?: HTMLElement[]

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:431


bindings: Bindings

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

Evented.bindings


optional classPrefix?: string

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:433


cleanup: Function | null

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:434


optional el?: HTMLElement | null

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:435


id: string

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:436


options: StepOptions

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:437


optional shepherdElementComponent?: ShepherdElementResult

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:438


optional target?: HTMLElement | null

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:439


tour: Tour

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:440

_getClassOptions(stepOptions): string

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:717

_getClassOptions gets all possible classes for the step

StepOptions

The step specific options

string

unique string from array of classes


_resolveAttachToOptions(): StepOptionsAttachTo

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:566

Resolves attachTo options.

StepOptionsAttachTo


_resolveExtraHiglightElements(): HTMLElement[]

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:557

Resolves attachTo options.

HTMLElement[]


_setOptions(options?): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:738

Sets the options for the step, maps when to events, sets up buttons

StepOptions = {}

The options for the step

void


cancel(): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:478

Cancel the tour Triggers the cancel event

void


complete(): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:487

Complete the tour Triggers the complete event

void


destroy(): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:496

Remove the step, delete the step’s element, and destroy the FloatingUI instance for the step. Triggers destroy event

void


getElement(): HTMLElement | null | undefined

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:625

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: docs-src/node_modules/shepherd.js/src/step.ts:633

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: docs-src/node_modules/shepherd.js/src/step.ts:532

Returns the tour for the step

Tour

The tour instance


hide(): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:539

Hide the step

void


isOpen(): boolean

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:588

Check if the step is open and visible

boolean

True if the step is open and visible


off(event, handler?): Step

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

Removes an event listener for the given event string.

string

AnyHandler

Step

Evented.off


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

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

Step

Evented.on


once(event, handler, ctx?): Step

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

Step

Evented.once


show(): Promise<void>

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:595

Wraps _show and ensures beforeShowPromise resolves before calling show

Promise<void>


trigger(event, …args): Step

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

Triggers an event listener for the given event string.

string

any[]

Step

Evented.trigger


updateStepOptions(options): void

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:609

Updates the options of the step.

StepOptions

The options for the step

void