Widget JavaScript API reference
A quick reference for every method and event the Featul widget SDK exposes.
On this page
More in Core Features
- Manage feedback boards
- Use the roadmap
- Publish changelog entries
- Embed the feedback widget in your app
- Branding and customization
- Guest and anonymous feedback
- Internal comments and team collaboration
- Collect feedback with boards
- Move feedback through statuses
- Voting and comments
- Merge duplicate feedback posts
- Private boards
- Identify signed-in users in the widget
- Widget configuration options
- Widget JavaScript API reference
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. Passnullto 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?