Parameters
argsany[]Returns
voidEMBED SDK
Vanilla JavaScript embed for any website. Drop in a single script tag with your project key.
<script src="https://cdn.appgram.dev/appgram.min.js" data-project="YOUR_PROJECT_ID"></script><script
src="https://cdn.appgram.dev/appgram.min.js"
data-project="YOUR_PROJECT_ID"
></script>argsany[]voidAppGram Embed SDK Types
constructor→ AppGramsettings: Partial<AppGramSettings>close→ voidClose the widget
destroy→ voidDestroy the widget and clean up
init→ voidInitialize the widget based on mode
isOpen→ booleanCheck if widget is open
navigate→ voidNavigate to a specific page
page: AppGramPageoff→ voidUnsubscribe from events
event: AppGramEventTypecallback: AppGramEventCallbackon→ () => voidSubscribe to events
event: AppGramEventTypecallback: AppGramEventCallbackopen→ voidOpen the widget (modal mode)
page: AppGramPageoptionalready→ Promise<void>Wait for the widget to be ready
setTheme→ voidSet theme
theme: "light" | "dark"setUser→ voidSet user data for the embed
user: null | AppGramUserClose the widget
voidsettingsPartial<AppGramSettings>AppGramDestroy the widget and clean up
voidInitialize the widget based on mode
voidCheck if widget is open
booleanNavigate to a specific page
pageAppGramPagevoidUnsubscribe from events
eventAppGramEventTypecallbackAppGramEventCallbackvoidSubscribe to events
eventAppGramEventTypecallbackAppGramEventCallback() => voidOpen the widget (modal mode)
pageAppGramPageoptionalvoidWait for the widget to be ready
Promise<void>Set theme
theme"light" | "dark"voidSet user data for the embed
usernull | AppGramUservoidbaseUrlstringoptionalBase URL for self-hosted deployments
buttonIconstringoptionalCustom icon (emoji or SVG url) for floating button
buttonTextstringoptionalCustom text for floating button
containerstringoptionalContainer selector for inline mode (CSS selector)
defaultPageAppGramPageoptionalPage to show when widget opens
modeAppGramModeoptionalDisplay mode for the widget
onClose() => voidoptionalCalled when widget is closed
onError(error: Error) => voidoptionalCalled on error
onFeedbackSubmit(wish: any) => voidoptionalCalled when feedback is submitted
onNavigate(page: string) => voidoptionalCalled when user navigates to a different page
onReady() => voidoptionalCalled when widget is ready
onTicketCreate(ticket: any) => voidoptionalCalled when support ticket is created
onVote(wishId: string, voteCount: number) => voidoptionalCalled when user votes on a wish
pagesAppGramPage[]optionalAvailable pages in the widget
positionAppGramPositionoptionalPosition of floating button
projectKeystringProject key in format 'orgSlug/projectSlug' or UUID
routeFormat"embed" | "p-embed"optionalRoute format for UUID projects
showFooterbooleanoptionalShow footer with links
showHeaderbooleanoptionalShow header with title
showNavigationbooleanoptionalShow navigation tabs
themeAppGramThemeoptionalTheme customization
userAppGramUseroptionalPre-set user data for authenticated users
backgroundColorstringoptionalborderRadiusnumberoptionalprimaryColorstringoptionaltextColorstringoptionalemailstringoptionalidstringoptionalnamestringoptionalBase URL for self-hosted deployments
Custom icon (emoji or SVG url) for floating button
Custom text for floating button
Container selector for inline mode (CSS selector)
Page to show when widget opens
Display mode for the widget
Called when widget is closed
voidCalled on error
errorErrorvoidCalled when feedback is submitted
wishanyvoidCalled when user navigates to a different page
pagestringvoidCalled when widget is ready
voidCalled when support ticket is created
ticketanyvoidCalled when user votes on a wish
wishIdstringvoteCountnumbervoidAvailable pages in the widget
Position of floating button
Project key in format 'orgSlug/projectSlug' or UUID
Route format for UUID projects
Show footer with links
Show header with title
Show navigation tabs
Theme customization
Pre-set user data for authenticated users
Check if project key is a UUID
projectKeystringbooleanParse project key into org and project slugs Supports both "org/project" format and UUID format
projectKeystringobject