Documentation Index
Fetch the complete documentation index at: https://docs.heylua.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
Required. The ID of the AI agent to use for conversations.Get this from your Lua AI dashboard.
Basic Configuration
Widget position on the page.Options:
"bottom-right", "bottom-left", "top-right", "top-left"Text displayed on the chat button.
API environment to use.Options:
"staging", "production", "custom"Authentication & Session
Unique session identifier for the user.If not provided, auto-generated. Use for persistent conversations across page loads.
Optional authentication token for authenticated users.
Custom API base URL (only when
environment is "custom").Display Configuration
How the widget is displayed.Options:
"floating", "embedded"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:Height of the chat window.
Width of the chat window.
Visual Customization
Background color of the chat button.
Icon or emoji displayed on the button.
Title displayed in the chat header.
Placeholder text for the input field.
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
Custom CSS styles for the chat button.
Custom CSS styles for button positioning.
Custom CSS styles for the chat header.
Branding
Subtitle configuration for branding.Example:
Advanced Features
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.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.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.Disable automatic link previews.
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

