Skip to content

Step

A class representing steps to be added to a tour.

Extends

Constructors

new Step(tour, options)

new Step(tour, options): Step

Parameters

tour: Tour

options: StepOptions= {}

Returns

Step

Overrides

Evented.constructor

Source

step.ts:286

Properties

_resolvedAttachTo

_resolvedAttachTo: null | StepOptionsAttachTo

Source

step.ts:276


bindings

bindings: Bindings

Inherited from

Evented.bindings

Source

evented.ts:11


classPrefix?

optional classPrefix: string

Source

step.ts:277


cleanup

cleanup: null | Function

Source

step.ts:279


el?

optional el: null | HTMLElement

Source

step.ts:280


id

id: string

Source

step.ts:281


options

options: StepOptions

Source

step.ts:282


target?

optional target: null | HTMLElement

Source

step.ts:283


tour

tour: Tour

Source

step.ts:284

Methods

_getClassOptions()

_getClassOptions(stepOptions): string

_getClassOptions gets all possible classes for the step

Parameters

stepOptions: StepOptions

The step specific options

Returns

string

unique string from array of classes

Source

step.ts:497


_resolveAttachToOptions()

_resolveAttachToOptions(): StepOptionsAttachTo

Resolves attachTo options.

Returns

StepOptionsAttachTo

Source

step.ts:375


_setOptions()

_setOptions(options): void

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

Parameters

options: StepOptions= {}

The options for the step

Returns

void

Source

step.ts:518


cancel()

cancel(): void

Cancel the tour Triggers the cancel event

Returns

void

Source

step.ts:315


complete()

complete(): void

Complete the tour Triggers the complete event

Returns

void

Source

step.ts:324


destroy()

destroy(): void

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

Returns

void

Source

step.ts:333


getElement()

getElement(): undefined | null | HTMLElement

Returns the element for the step

Returns

undefined | null | HTMLElement

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

Source

step.ts:432


getTarget()

getTarget(): undefined | null | HTMLElement

Returns the target for the step

Returns

undefined | null | HTMLElement

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

Source

step.ts:440


getTour()

getTour(): Tour

Returns the tour for the step

Returns

Tour

The tour instance

Source

step.ts:350


hide()

hide(): void

Hide the step

Returns

void

Source

step.ts:357


isOpen()

isOpen(): boolean

Check if the step is open and visible

Returns

boolean

True if the step is open and visible

Source

step.ts:397


off()

off(event, handler): Step

Removes an event listener for the given event string.

Parameters

event: string

handler: AnyHandler

Returns

Step

Inherited from

Evented.off

Source

evented.ts:53


on()

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

Adds an event listener for the given event string.

Parameters

event: string

handler: AnyHandler

ctx?: unknown

once?: boolean= false

Returns

Step

Inherited from

Evented.on

Source

evented.ts:22


once()

once(event, handler, ctx?): Step

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

Parameters

event: string

handler: AnyHandler

ctx?: unknown

Returns

Step

Inherited from

Evented.once

Source

evented.ts:42


show()

show(): Promise<void>

Wraps _show and ensures beforeShowPromise resolves before calling show

Returns

Promise<void>

Source

step.ts:404


trigger()

trigger(event, …args): Step

Triggers an event listener for the given event string.

Parameters

event: string

• …args: any[]

Returns

Step

Inherited from

Evented.trigger

Source

evented.ts:78


updateStepOptions()

updateStepOptions(options): void

Updates the options of the step.

Parameters

options: StepOptions

The options for the step

Returns

void

Source

step.ts:418