This article provides a comprehensive reference for the Userorbit Widget JavaScript API, detailing methods to programmatically open, close, and toggle the widget, including opening to specific modules and integrating with custom UI elements.
The Userorbit Widget JavaScript API lets you open, close, and direct users to specific widget sections from your application.
Open and close the widget
await userorbit.openWidget();
await userorbit.closeWidget();Open a specific tab
The widget supports these tab values: feedback, roadmap, updates, and help.
await userorbit.openWidget({ tab: "help" });
await userorbit.openWidget({ tab: "feedback" });
await userorbit.openWidget({ tab: "updates" });
await userorbit.openWidget({ tab: "roadmap" });Show only selected tabs
await userorbit.openWidget({
tab: "help",
activeTabs: ["help", "feedback"]
});Deep link to content
You can open the widget directly to a specific article, announcement, roadmap, or topic when you already have the ID.
await userorbit.openWidget({ tab: "help", articleId: "ARTICLE_ID" });
await userorbit.openWidget({ tab: "updates", announcementId: "ANNOUNCEMENT_ID" });
await userorbit.openWidget({ tab: "roadmap", topicId: "TOPIC_ID" });Feedback form shortcut
await userorbit.openWidget({
tab: "feedback",
showFeedbackForm: true
});Other options
localeorlanguage: choose the language used by the widget.modal: open as a modal experience when supported by the current widget configuration.compact: request a compact presentation.position: set the widget position tobottom-right,bottom-left, ortop-right.