StepOptionsCancelIcon
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:361
Properties
Section titled “Properties”attrs?
Section titled “attrs?”
optionalattrs?:Record<string,string|number|boolean>
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:385
Additional HTML attributes to apply to the cancel icon button element.
This is useful for adding data attributes for testing or analytics, or other custom attributes that don’t have dedicated properties.
Note: These attributes are applied before Shepherd’s core attributes,
so they cannot override critical properties like type, onclick,
class, or aria-label. Use the dedicated label property to
control the aria-label.
Example
Section titled “Example”cancelIcon: { enabled: true, label: 'Close Tour', attrs: { 'data-test': 'close-tour-button', 'data-analytics-id': 'tour-close' }}enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:389
Should a cancel ”✕” be shown in the header of the step?
label?
Section titled “label?”
optionallabel?:string
Defined in: docs-src/node_modules/shepherd.js/src/step.ts:393
The label to add for aria-label