intro.js
    Preparing search index...

    Intro.js Tour class

    Implements

    Index
    • Create a new Tour instance

      Parameters

      • OptionalelementOrSelector: string | HTMLElement

        Optional target element or CSS query to start the Tour on

      • Optionaloptions: Partial<TourOptions>

        Optional Tour options

      Returns Tour

    • Append the floating element to the target element. Floating element is a helper element that is used when the step does not have a target element. For internal use only.

      Returns Element

    • Returns number | undefined

      currentStep() is deprecated, please use getCurrentStep() instead.

    • Decrement the current step of the tour (does not start the tour step, must be in conjunction with previousStep)

      Returns Promise<Tour>

    • Send an event to all onEvent listeners. This is an internal method and should not be used outside of the package.

      Parameters

      Returns void

    • Returns the underlying state of the current step This is an internal method and should not be used outside of the package.

      Returns State<number | undefined>

    • Get the direction of the tour (forward or backward)

      Returns "forward" | "backward"

    • Returns the underlying state of the refreshes This is an internal method and should not be used outside of the package.

      Returns State<number>

    • Returns the currently resolved theme ("light" or "dark"), or undefined if the tour hasn't started yet.

      Returns "light" | "dark" | undefined

    • Go to a specific step of the tour with the explicit [data-step] number

      Parameters

      • stepNumber: number

        [data-step] value of the step

      Returns Promise<Tour>

    • Increment the current step of the tour (does not start the tour step, must be called in conjunction with nextStep)

      Returns Promise<Tour>

    • Whether the tour's root element has been created (it is created right after the first step is shown) This is an internal method and should not be used outside of the package.

      Returns boolean

    • Called by the tooltip of the given step once it has been rendered and positioned This is an internal method and should not be used outside of the package.

      Parameters

      • Optionalstep: number

      Returns void

    • Listen to all tour lifecycle events (start, step, skip, complete, exit). Unlike the on* callbacks, any number of listeners can be added, so an analytics integration does not replace your own callbacks. A listener that throws does not interrupt the tour.

      Parameters

      Returns Tour

    • Set the current step of the tour and the direction of the tour

      Parameters

      • step: number

      Returns Promise<Tour>

    • Set the dontShowAgain option for the tour so that the tour does not show twice to the same user This is a persistent option that is stored in the browser's cookies

      Parameters

      • dontShowAgain: boolean

        boolean value to set the dontShowAgain option

      Returns Tour

    • Changes the tour's theme. If the tour is already running, the change is applied immediately; otherwise it's stored and used the next time the tour starts.

      Parameters

      • theme: string

        "light", "dark", "auto", or a registered/custom theme name

      • OptionalthemePath: string

        Optional path to a custom CSS file for the theme

      Returns Promise<Tour>

    • Resolves once the tooltip of the current step has been rendered and positioned. Resolves right away if that already happened (e.g. the step did not change because beforeChange returned false), and after a short timeout if the render never comes This is an internal method and should not be used outside of the package.

      Parameters

      • timeoutMs: number = 100

      Returns Promise<void>