<eka-medassist-widget> element — or programmatically with EkaMedAssist.init().
HTML attributes
Base URL for the agent-config and nudge API endpoints.
widget shows a floating launcher button; full renders a fullscreen overlay.A JSON object of key-value context pairs, merged into the session at init. Example:
context='{"intent":"book_appointment"}'.A JSON theme object. See Theme object for the supported keys.
CSS injected into the launcher’s Shadow DOM to reposition or restyle the button. See Custom launcher styling.
Which backend environment the widget talks to. Also affects asset loading.
Real-time transport: Server-Sent Events or WebSocket. Usually inherited from agent config.
Theme object
Pass these keys inside thetheme attribute (as JSON) or the theme field of init(). Theme values you set here override what the console provides.
Background image URL for the widget interior. Enables a glass-morphism treatment for the header and footer.
Theme mode. When
textColor is unset, it is derived from this (light → black text, dark → white text).Display modes
- Widget (floating)
- Full (fullscreen)
A floating launcher button in the corner; the chat opens in a panel. This is the default.
Custom launcher styling
To reposition or restyle the floating button, pass CSS viacustom-launcher-styles (or customLauncherStyles in init()). The CSS is injected into the launcher’s Shadow DOM, so media queries, hover states, and any other CSS all work. Two selectors form a stable contract:
This only affects the launcher button. The chat panel that opens on click is unaffected.
What comes from the console vs. your code
The widget resolves config from three sources. Higher in this list wins:1
EkaMedAssist.init() config (highest priority)
Anything you pass programmatically overrides everything else.
2
Agent config (from the console)
Fetched from the backend for your
agentId. Overrides HTML attributes.3
HTML attributes (lowest priority)
Values set directly on the element.
name/title, allowed inputs (text, file, audio, voice), nudge, connectivity, initial_message, the full theme (background, accent, mode, title image, tagline, nudge color), and hide_watermark.
Client-only (never from the backend): auth, context (merged with any console context), customLauncherStyles, redirectUrl, and showCloseButton.
Next steps
JavaScript API
Configure all of the above programmatically and hook into the close event.

