@@ -16,6 +16,8 @@ An embeddable chat widget that lets your AI chatbots render rich, interactive UI
1616- 🔌 ** Multi-Provider** - LangGraph, n8n, Make.com, or custom webhooks
1717- 🌊 ** Streaming Support** - Real-time streaming responses from your backend
1818- 📐 ** Multiple Layouts** - Full-page, side panel, or bottom tray form factors
19+ - 👋 ** Welcome Message** - Customizable greeting when starting a new conversation
20+ - 💡 ** Conversation Starters** - Pre-defined prompts to help users get started
1921
2022## Quick Start
2123
@@ -120,6 +122,22 @@ const chat = createChat({
120122 formFactor: " full-page" , // 'full-page', 'side-panel', or 'bottom-tray'
121123 enableDebugLogging: false , // Enable console debug logging
122124
125+ // Optional: Welcome message shown when thread is empty
126+ welcomeMessage: {
127+ title: " Hi, I'm Assistant" ,
128+ description: " I can help you with your questions." ,
129+ image: { url: " https://example.com/logo.png" },
130+ },
131+
132+ // Optional: Conversation starters
133+ conversationStarters: {
134+ variant: " short" , // 'short' for pill buttons, 'long' for list items
135+ options: [
136+ { displayText: " Help me get started" , prompt: " Help me get started" },
137+ { displayText: " What can you do?" , prompt: " What can you do?" },
138+ ],
139+ },
140+
123141 // Optional: Callbacks
124142 onSessionStart : (sessionId ) => {
125143 console .log (" Session started:" , sessionId);
@@ -331,6 +349,62 @@ Controls chat history persistence:
331349- ` 'localstorage' ` - Messages are saved to browser localStorage, persist across sessions
332350- ` 'langgraph' ` - Uses LangGraph's server-side thread management (requires ` langgraph ` provider)
333351
352+ ### welcomeMessage (optional)
353+
354+ ``` typescript
355+ welcomeMessage ?: {
356+ title?: string ; // Main heading text
357+ description ?: string ; // Subheading/description text
358+ image ?: { url: string }; // Optional logo/image
359+ } | React .ComponentType ; // Or provide a custom component
360+ ```
361+
362+ Displayed when the thread is empty to greet users.
363+
364+ ** Example:**
365+
366+ ``` javascript
367+ createChat ({
368+ n8n: { webhookUrl: " YOUR_WEBHOOK_URL" },
369+ welcomeMessage: {
370+ title: " Hi, I'm Assistant" ,
371+ description: " I can help you with your questions." ,
372+ image: { url: " /logo.png" },
373+ },
374+ });
375+ ```
376+
377+ ### conversationStarters (optional)
378+
379+ ``` typescript
380+ conversationStarters ?: {
381+ variant?: ' short' | ' long' ; // 'short' = pill buttons, 'long' = list items
382+ options : Array <{
383+ displayText: string ; // Text shown on the button
384+ prompt: string ; // Message sent when clicked
385+ icon? : React .ReactNode ; // Optional icon
386+ }>;
387+ }
388+ ```
389+
390+ Clickable prompts shown when the thread is empty to help users begin a conversation.
391+
392+ ** Example:**
393+
394+ ``` javascript
395+ createChat ({
396+ n8n: { webhookUrl: " YOUR_WEBHOOK_URL" },
397+ conversationStarters: {
398+ variant: " short" ,
399+ options: [
400+ { displayText: " Help me get started" , prompt: " Help me get started" },
401+ { displayText: " What can you do?" , prompt: " What can you do?" },
402+ { displayText: " Show me examples" , prompt: " Show me some examples" },
403+ ],
404+ },
405+ });
406+ ```
407+
334408### formFactor (optional)
335409
336410``` typescript
0 commit comments