Widget
Widget Integration.
The Nestled widget is a self-contained JS snippet that renders inside a Shadow DOM — it never conflicts with your styles.
Installation
<script src="https://cdn.nestled.co/v1/widget.js" data-token="YOUR_EMBED_TOKEN" async></script>
Data attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
data-token | string | — | Required. Embed token. |
data-position | string | bottom-right | bottom-right or bottom-left. |
data-color | string | Dashboard | Primary hex color. |
data-open | boolean | false | Auto-open on page load. |
data-greeting | string | Dashboard | Override welcome message. |
Programmatic API
After load, window.__nestled__ exposes:
window.__nestled__.open() window.__nestled__.close() window.__nestled__.send("Your question")
Shadow DOM isolation
The widget renders inside a Shadow DOM. No CSS collisions in either direction.
Mobile behaviour
On viewports under 480px the widget panel expands full-screen.