Guide
Learn everything about the boardme Guide API.
Overview
boardme allows you programmatic access to Guides. The API calls help you gain fine-grained control over your user onboarding process.
To use the API you need to have boardme installed into your website or application!
If you are using the API within your JavaScript codebase, make sure boardme is imported before your application code!
In your application code, you can find boardme on the window object. It is in the global scope.
NPM package is available for improved development experience. Check it out here.
Using the NPM Package
You can add boardme to your project by executing the command below in your terminal.
Once installed, you can import it into your JavaScript or TypeScript code base and start using the API. The autocomplete should help you find the methods you are looking for.
If you are using the boardme API through the installed package, all your calls will be handled gracefully and you don't have to worry about a script import error crashing your application.
boardme.getGuide();
You can fetch and store a Guide by calling this API method. When calling it you have to pass the unique identifier of the Guide as a string.
Once you stored it, you can use the public API available on the guide itself to hook up event listeners, change guide configuration, or alter its behavior.
Arguments
guideIdentifier - unique identifier of the Guide as a string.
Returns
Guide - boardme Guide object.
Example
boardme.renderGuide();
You can display guides programmatically by calling this API method. When calling it you have to pass in the unique identifier of the Guide as a string.
Arguments
guideIdentifier - unique identifier of the Guide as a string.
targetElement - HTML Target Element, only relevant when rendering Tooltips.
Optional
Returns
Guide - boardme Guide object.
Example
boardme.clearGuide();
You can remove a specific guide from the screen by calling this API method. When calling it you have to pass the unique identifier of the Guide as a string.
Arguments
guideIdentifier - unique identifier of the Guide as a string.
Example
boardme.clearGuides();
You can remove multiple guides from the screen by calling this API method. When calling it you'll have to pass an array containing the unique identifiers of the Guides you'd like to clear.
Arguments
guideIdentifiers - unique identifiers of the Guides as a string array.
Example
Guide.show();
It renders the guide onto the screen.
Returns
Guide - boardme Guide object.
Example
Guide.hide();
It hides the guide from the screen.
Returns
Guide - boardme Guide object.
Example
Guide.onSubmit();
You can execute a custom piece of logic when the guide has been submitted by hooking into this event listener.
Arguments
callback - function to be executed when the Guide has been submitted.
Example
Guide.onDismiss();
You can execute a custom piece of logic when the guide has been dismissed by hooking into this event listener.
Arguments
callback - function to be executed when the Guide has been dismissed.
Example
Guide.setBehavior();
It alters the behavior of the guide and lets you gain extra control over it.
Arguments
behavior- behavior can be "auto" or "manual". The default behavior is auto, but by setting it to manual you can take programmatic control of the guide. The library exports an enum of type GuideBehavior that you can use for the argument, but strings work as well.
Example
Last updated