Widget JavaScript API reference

A quick reference for every method and event the Featul widget SDK exposes.

TFTeam FeatulUpdated Oct 241 min read

The widget SDK exposes a small set of methods and events you can use to control the widget programmatically.

Methods

  • featul.init(workspaceId, options) – Initialise the widget. Call this once after the SDK script loads.

  • featul.identify(identity) – Pass a signed identity object to attribute activity to a signed-in user. Pass null to clear the identity on logout.

  • featul.showWidget() – Open the widget. Optionally pass { section: "roadmap" } to open a specific tab.

  • featul.hideWidget() – Close the widget programmatically.

  • featul.destroy() – Remove the widget from the page entirely.

Events

Use featul.on(event, handler) to subscribe and featul.off(event, handler) to unsubscribe.

  • ready – Fires when the widget has finished loading.

  • open – Fires when the widget is opened.

  • close – Fires when the widget is closed.

Async loading

The SDK loader is asynchronous. Any calls you make before the script finishes loading are queued automatically, so you do not need to wait for the script before calling featul.init().

Was this helpful?

Still stuck?

Post it on the board. The team answers there.