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.
Control the Userorbit widget from your application after the SDK has initialized.
Valid tabs are home, feedback, roadmap, updates, help, and support.
The requested module must be enabled for the widget and available on the workspace plan. Catch rejected promises when widget actions are triggered from application code so you can handle initialization or access errors gracefully.
Methods
Use these methods after initialization:await userorbit.openWidget(options)opens the widget.await userorbit.closeWidget()closes it.await userorbit.updateTheme("light" | "dark" | "system")changes theme resolution.
openWidget supports tab, activeTabs, locale, language, announcementId, roadmapId, articleId, askAi, initialMessage, autoSubmitInitialMessage, showFeedbackForm, modal, compact, and position.Valid tabs are home, feedback, roadmap, updates, help, and support.
topicId is deprecated; use roadmapId.Open a specific article
await userorbit.openWidget({
tab: "help",
articleId: "ARTICLE_ID",
});JavaScriptThe requested module must be enabled for the widget and available on the workspace plan. Catch rejected promises when widget actions are triggered from application code so you can handle initialization or access errors gracefully.