Skip to content

StepOptionsCancelIcon

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:320

optional attrs: Record<string, string | number | boolean>

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:344

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.

cancelIcon: {
enabled: true,
label: 'Close Tour',
attrs: {
'data-test': 'close-tour-button',
'data-analytics-id': 'tour-close'
}
}

optional enabled: boolean

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:348

Should a cancel ”✕” be shown in the header of the step?


optional label: string

Defined in: docs-src/node_modules/shepherd.js/src/step.ts:352

The label to add for aria-label