Dashboard vs Inline Configuration
All widget settings can be configured directly in the Lua AI admin dashboard — no code changes needed. To use dashboard settings, initialize the widget with no arguments:Configuration priority: Any option passed to
window.LuaPop.init({...}) takes priority over the corresponding dashboard setting. Options not passed in code fall back to dashboard values. Call window.LuaPop.init() with no arguments to use dashboard settings exclusively.window.LuaPop.init(config)
Initialize the LuaPop widget with the provided configuration.destroy() method
Required Configuration
string
required
Required. The ID of the AI agent to use for conversations.Get this from your Lua AI dashboard.
Basic Configuration
string
default:"bottom-right"
Widget position on the page.Options:
"bottom-right", "bottom-left", "top-right", "top-left"string
default:"Chat with us"
Text displayed on the chat button.
string
default:"production"
API environment to use.Options:
"staging", "production", "custom"Authentication & Session
string
Unique session identifier for the user.If not provided, auto-generated. Use for persistent conversations across page loads.
string
Optional authentication token for authenticated users.
string
Custom API base URL (only when
environment is "custom").Display Configuration
string
default:"floating"
How the widget is displayed.Options:
"floating", "embedded"boolean
default:false
Allow users to drag and drop the floating button (pill) to reposition it. Useful when the button overlaps other elements on your page — users can move it out of the way. Only applies when
displayMode is "floating".object
Configuration for embedded mode. Required when
displayMode is "embedded".targetContainerId (required) — The id of the DOM element the widget will render into.conversationStarters (optional) — An array of suggested prompts displayed to the user before they send their first message. Clicking a starter sends it as a message.useContainerHeight (optional, default false) — When true, the widget always fills its container using height: 100%. Use this for footer or expandable layouts where the container height changes dynamically. When false, the widget auto-detects an explicit container height and falls back to 100dvh if none is set.Example:string | number
default:"500px"
Height of the chat window.
string | number
default:"350px"
Width of the chat window.
Visual Customization
string
default:"#007bff"
Background color of the chat button.
string
default:"💬"
Icon or emoji displayed on the button.
string
default:"Chat"
Title displayed in the chat header.
string
default:"Ask anything, about anything"
Placeholder text for the input field.
string
default:"Hi! How can I help you today?"
Welcome message displayed when the chat is first opened and no conversation history exists.This message appears as the first assistant message, helping to greet users and set the tone for the conversation.
Advanced Styling
React.CSSProperties
Custom CSS styles for the chat button.
React.CSSProperties
Custom CSS styles for button positioning.
React.CSSProperties
Custom CSS styles for the chat header.
Branding
object
Subtitle configuration for branding.Example:
Advanced Features
boolean
default:false
Enable voice chat functionality. When
true, users can switch to a full voice interaction mode where AI responses are spoken aloud. See the Voice Chat guide for details.boolean
default:false
Show a microphone button in the chat input bar, allowing users to dictate messages via speech-to-text. Unlike
voiceModeEnabled, this keeps the interaction in text mode — the spoken input is transcribed into the text field rather than switching to a full voice experience.boolean
default:false
Allow users to upload and send file attachments (images, documents, etc.) within the chat. When
true, a file attachment button appears in the chat input bar.boolean
default:false
Disable automatic link previews.
string
Additional context passed to the AI agent.Useful for providing page context, user roles, etc.
Event Handlers
Handler for navigation events from the chat.Example:
Complete Example
Configuration Tips
Use Staging for Testing
Use Staging for Testing
Always test new configurations with staging first:
Generate Unique Session IDs
Generate Unique Session IDs
Create unique sessions for better tracking:
Use Runtime Context
Use Runtime Context
Pass page context to help the AI provide better responses:
Responsive Configuration
Responsive Configuration
Adjust for different screen sizes:
Next Steps
Styling Guide
Customize colors, fonts, and appearance
Events API
Listen to chat events and interactions
Examples
See real-world configurations
Framework Integration
React, Vue, Angular guides

