Web SDK
Configuration
Full configuration reference: positioning, theming, audio, custom CSS variables, and debug modes.
Overview
The SDK provides comprehensive runtime options to adapt widget visual styling, audio settings, and positioning to match your product's UI design system.
Full Options Interface
interface AsiystOptions {
position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
offset?: { x?: number; y?: number };
theme?: "light" | "dark" | "auto";
soundEffects?: boolean;
voiceEnabled?: boolean;
autoGreeting?: boolean;
greetingDelayMs?: number;
zIndex?: number;
initialMessage?: string;
suggestedQuestions?: string[];
debug?: boolean;
}
Theming & Dark Mode
theme: "auto"respects the visitor's operating system (prefers-color-scheme).
theme: "dark"enforces high-contrast dark surfaces (#171717).
- Switch themes dynamically without re-mounting:
Asiyst.setTheme("dark");
Custom Offsets & Positioning
Asiyst.init({
projectId: "proj_9f8a2b3c4d",
publicKey: "pk_live_8e7d6c5b4a3f2e1d",
options: {
position: "bottom-right",
offset: { x: 24, y: 80 }, // Shifts above bottom cookie banner
zIndex: 9999,
},
});