@oneboard/widget
v1.3.2
Published
OneBoard widget
Downloads
41
Readme
@oneboard/widget
Example
import OneBoard from '@oneboard/widget';
const oneBoard = new OneBoard({
appPublicKey: '<AppPublicKey>',
verificationToken: '<UserVerificationToken>',
});
oneBoard.openOnBoardingModal();
Installing
npm install @oneboard/widget
Or self-host / CDN
<script src="build/index.js"></script>
Configuration
Specify configuration options when creating a OneBoard instance
Example
import OneBoard from '@oneboard/widget';
new OneBoard({...options})
Options
| Option | Type | Required | Desciption |
| ------------------- | --------- | --------- | ----------------------------------------------------------------------------- |
| appPublicKey
| String | Yes | Public key for your OneBoard application |
| verificationToken
| String | No | User token for verification request. You van get it from oneboard SDK |
API
openOnBoardingModal([options])
Open OneBoard widget as modal
Example
oneBoard.openOnBoardingModal({ fullScreen: true });
Options
fullScreen
: (Optional) Lifetime for access token in seconds. Defaults tofalse
.
renderOnBoardingView(container)
Render OneBoard widget view to custom element specified in container
argument.
container
can be CSS selector or DOM Element
Example
<div id="oneboard-container"></div>
oneBoard.renderOnBoardingView('#oneboard-container');