Step
A class representing steps to be added to a tour.
Extends
Constructors
new Step()
new Step(
tour
,options
):Step
Parameters
• tour: Tour
• options: StepOptions
= {}
Returns
Overrides
Defined in
step.ts:286
Properties
_resolvedAttachTo
_resolvedAttachTo:
null
|StepOptionsAttachTo
Defined in
step.ts:276
bindings
bindings:
Bindings
Inherited from
Defined in
evented.ts:11
classPrefix?
optional
classPrefix:string
Defined in
step.ts:277
cleanup
cleanup:
null
|Function
Defined in
step.ts:279
el?
optional
el:null
|HTMLElement
Defined in
step.ts:280
id
id:
string
Defined in
step.ts:281
options
options:
StepOptions
Defined in
step.ts:282
target?
optional
target:null
|HTMLElement
Defined in
step.ts:283
tour
tour:
Tour
Defined in
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
Defined in
step.ts:497
_resolveAttachToOptions()
_resolveAttachToOptions():
StepOptionsAttachTo
Resolves attachTo options.
Returns
Defined in
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
Defined in
step.ts:518
cancel()
cancel():
void
Cancel the tour
Triggers the cancel
event
Returns
void
Defined in
step.ts:315
complete()
complete():
void
Complete the tour
Triggers the complete
event
Returns
void
Defined in
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
Defined in
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
Defined in
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
Defined in
step.ts:440
getTour()
getTour():
Tour
Returns the tour for the step
Returns
The tour instance
Defined in
step.ts:350
hide()
hide():
void
Hide the step
Returns
void
Defined in
step.ts:357
isOpen()
isOpen():
boolean
Check if the step is open and visible
Returns
boolean
True if the step is open and visible
Defined in
step.ts:397
off()
off(
event
,handler
?):Step
Removes an event listener for the given event string.
Parameters
• event: string
• handler?: AnyHandler
Returns
Inherited from
Defined in
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
Inherited from
Defined in
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
Inherited from
Defined in
evented.ts:42
show()
show():
Promise
<void
>
Wraps _show
and ensures beforeShowPromise
resolves before calling show
Returns
Promise
<void
>
Defined in
step.ts:404
trigger()
trigger(
event
, …args
):Step
Triggers an event listener for the given event string.
Parameters
• event: string
• …args: any
[]
Returns
Inherited from
Defined in
evented.ts:78
updateStepOptions()
updateStepOptions(
options
):void
Updates the options of the step.
Parameters
• options: StepOptions
The options for the step
Returns
void
Defined in
step.ts:418