Step
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:428
A class representing steps to be added to a tour.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Step(
tour,options?):Step
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:442
Parameters
Section titled “Parameters”options?
Section titled “options?”StepOptions = {}
Returns
Section titled “Returns”Step
Overrides
Section titled “Overrides”Properties
Section titled “Properties”_advanceOnCleanup?
Section titled “_advanceOnCleanup?”
optional_advanceOnCleanup?: (() =>void) |null
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:429
_originalTabIndexes
Section titled “_originalTabIndexes”_originalTabIndexes:
Map<Element,string>
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:432
_resolvedAttachTo
Section titled “_resolvedAttachTo”_resolvedAttachTo:
StepOptionsAttachTo|null
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:430
_resolvedExtraHighlightElements?
Section titled “_resolvedExtraHighlightElements?”
optional_resolvedExtraHighlightElements?:HTMLElement[]
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:431
bindings
Section titled “bindings”bindings:
Bindings
Defined in: docs-src/node_modules/shepherd.js/src/evented.ts:11
Inherited from
Section titled “Inherited from”classPrefix?
Section titled “classPrefix?”
optionalclassPrefix?:string
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:433
cleanup
Section titled “cleanup”cleanup:
Function|null
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:434
optionalel?: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
Section titled “options”options:
StepOptions
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:437
shepherdElementComponent?
Section titled “shepherdElementComponent?”
optionalshepherdElementComponent?:ShepherdElementResult
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:438
target?
Section titled “target?”
optionaltarget?: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
Methods
Section titled “Methods”_getClassOptions()
Section titled “_getClassOptions()”_getClassOptions(
stepOptions):string
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:717
_getClassOptions gets all possible classes for the step
Parameters
Section titled “Parameters”stepOptions
Section titled “stepOptions”The step specific options
Returns
Section titled “Returns”string
unique string from array of classes
_resolveAttachToOptions()
Section titled “_resolveAttachToOptions()”_resolveAttachToOptions():
StepOptionsAttachTo
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:566
Resolves attachTo options.
Returns
Section titled “Returns”_resolveExtraHiglightElements()
Section titled “_resolveExtraHiglightElements()”_resolveExtraHiglightElements():
HTMLElement[]
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:557
Resolves attachTo options.
Returns
Section titled “Returns”HTMLElement[]
_setOptions()
Section titled “_setOptions()”_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
Parameters
Section titled “Parameters”options?
Section titled “options?”StepOptions = {}
The options for the step
Returns
Section titled “Returns”void
cancel()
Section titled “cancel()”cancel():
void
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:478
Cancel the tour
Triggers the cancel event
Returns
Section titled “Returns”void
complete()
Section titled “complete()”complete():
void
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:487
Complete the tour
Triggers the complete event
Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”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
Returns
Section titled “Returns”void
getElement()
Section titled “getElement()”getElement():
HTMLElement|null|undefined
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:625
Returns the element for the step
Returns
Section titled “Returns”HTMLElement | null | undefined
The element instance. undefined if it has never been shown, null if it has been destroyed
getTarget()
Section titled “getTarget()”getTarget():
HTMLElement|null|undefined
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:633
Returns the target for the step
Returns
Section titled “Returns”HTMLElement | null | undefined
The element instance. undefined if it has never been shown, null if query string has not been found
getTour()
Section titled “getTour()”getTour():
Tour
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:532
Returns the tour for the step
Returns
Section titled “Returns”The tour instance
hide()
Section titled “hide()”hide():
void
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:539
Hide the step
Returns
Section titled “Returns”void
isOpen()
Section titled “isOpen()”isOpen():
boolean
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:588
Check if the step is open and visible
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”string
handler?
Section titled “handler?”Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”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.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”unknown
boolean = false
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”once()
Section titled “once()”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.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”unknown
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”show()
Section titled “show()”show():
Promise<void>
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:595
Wraps _show and ensures beforeShowPromise resolves before calling show
Returns
Section titled “Returns”Promise<void>
trigger()
Section titled “trigger()”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.
Parameters
Section titled “Parameters”string
…any[]
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”updateStepOptions()
Section titled “updateStepOptions()”updateStepOptions(
options):void
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:609
Updates the options of the step.
Parameters
Section titled “Parameters”options
Section titled “options”The options for the step
Returns
Section titled “Returns”void