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
docs-src/node_modules/shepherd.js/src/step.ts:309
Properties
_resolvedAttachTo
_resolvedAttachTo:
null
|StepOptionsAttachTo
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:298
_resolvedExtraHighlightElements?
optional
_resolvedExtraHighlightElements:HTMLElement
[]
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:299
bindings
bindings:
Bindings
Inherited from
Defined in
docs-src/node_modules/shepherd.js/src/evented.ts:11
classPrefix?
optional
classPrefix:string
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:300
cleanup
cleanup:
null
|Function
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:302
el?
optional
el:null
|HTMLElement
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:303
id
id:
string
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:304
options
options:
StepOptions
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:305
target?
optional
target:null
|HTMLElement
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:306
tour
tour:
Tour
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:307
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
docs-src/node_modules/shepherd.js/src/step.ts:529
_resolveAttachToOptions()
_resolveAttachToOptions():
StepOptionsAttachTo
Resolves attachTo options.
Returns
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:407
_resolveExtraHiglightElements()
_resolveExtraHiglightElements():
HTMLElement
[]
Resolves attachTo options.
Returns
HTMLElement
[]
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:398
_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
docs-src/node_modules/shepherd.js/src/step.ts:550
cancel()
cancel():
void
Cancel the tour
Triggers the cancel
event
Returns
void
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:338
complete()
complete():
void
Complete the tour
Triggers the complete
event
Returns
void
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:347
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
docs-src/node_modules/shepherd.js/src/step.ts:356
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
docs-src/node_modules/shepherd.js/src/step.ts:464
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
docs-src/node_modules/shepherd.js/src/step.ts:472
getTour()
getTour():
Tour
Returns the tour for the step
Returns
The tour instance
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:373
hide()
hide():
void
Hide the step
Returns
void
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:380
isOpen()
isOpen():
boolean
Check if the step is open and visible
Returns
boolean
True if the step is open and visible
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:429
off()
off(
event
,handler
?):Step
Removes an event listener for the given event string.
Parameters
• event: string
• handler?: AnyHandler
Returns
Inherited from
Defined in
docs-src/node_modules/shepherd.js/src/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
docs-src/node_modules/shepherd.js/src/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
docs-src/node_modules/shepherd.js/src/evented.ts:42
show()
show():
Promise
<void
>
Wraps _show
and ensures beforeShowPromise
resolves before calling show
Returns
Promise
<void
>
Defined in
docs-src/node_modules/shepherd.js/src/step.ts:436
trigger()
trigger(
event
, …args
):Step
Triggers an event listener for the given event string.
Parameters
• event: string
• …args: any
[]
Returns
Inherited from
Defined in
docs-src/node_modules/shepherd.js/src/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
docs-src/node_modules/shepherd.js/src/step.ts:450