Skip to content

Context7 Platform -- Up-to-date docs for AI agents

add new attribute to docs (#2828)

Enes Gules0647bb345173
diff --git a/docs/howto/chat-widget.mdx b/docs/howto/chat-widget.mdx
index dfa83f31..4f4bbcc7 100644
--- a/docs/howto/chat-widget.mdx
+++ b/docs/howto/chat-widget.mdx
@@ -83,7 +83,8 @@ Detect which framework this project uses and add the widget accordingly. Place
it in the root layout or HTML file so it loads on every page.
Optional attributes: data-color (hex color, default #059669), data-position
-(bottom-right or bottom-left), data-placeholder (input placeholder text).
+(bottom-right or bottom-left), data-placeholder (input placeholder text),
+data-welcome-message (initial assistant message shown when the chat opens).
```
## Framework Examples
@@ -141,6 +142,7 @@ The widget supports optional attributes for customization:
| `data-color` | Brand color for the widget (hex code) | `#059669` |
| `data-position` | Widget position on the page | `bottom-right` |
| `data-placeholder` | Placeholder text in the input field | `Ask about the docs...` |
+| `data-welcome-message` | Initial assistant message shown when the chat opens | Generated from library ID |
### Examples
@@ -165,6 +167,16 @@ The widget supports optional attributes for customization:
></script>
```
+**Custom welcome message:**
+
+```html
+<script
+ src="https://context7.com/widget.js"
+ data-library="/vercel/next.js"
+ data-welcome-message="Hello! I'm here to help you with the Next.js documentation."
+></script>
+```
+
### Position Options
| Value | Description |