<eka-medassist-widget> element — or programmatically with EkaMedAssist.init().
HTML attributes
string
required
Your MedAssist agent identifier. The only required attribute.
string
Authentication token sent with the session.
string
default:"Medi Clinic"
Display title shown in the widget header.
string
default:"https://cdn.eka.care/bot-icon.svg"
Icon URL for the floating launcher button.
string
default:"https://matrix.eka.care/reloaded"
Base URL for the agent-config and nudge API endpoints.
"widget" | "full"
default:"widget"
widget shows a floating launcher button; full renders a fullscreen overlay.JSON string
A JSON object of key-value context pairs, merged into the session at init. Example:
context='{"intent":"book_appointment"}'.JSON string
A JSON theme object. See Theme object for the supported keys.
CSS string
CSS injected into the launcher’s Shadow DOM to reposition or restyle the button. See Custom launcher styling.
"true" | "false"
default:"false"
Allow the user to resize the widget once it’s open.
string
URL to redirect to when the widget closes. Setting this automatically shows a close button.
"production" | "staging" | "development"
default:"production"
Which backend environment the widget talks to. Also affects asset loading.
"sse" | "socket"
default:"socket"
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.
string
Primary accent color (hex). Drives buttons, accents, and the user message bubble.
string
Background image URL for the widget interior. Enables a glass-morphism treatment for the header and footer.
"black" | "white"
Text color override.
"light" | "dark"
Theme mode. When
textColor is unset, it is derived from this (light → black text, dark → white text).boolean
Tint the header with the primary color.
string
Custom logo/title image URL shown in the header.
string
Tagline text shown beneath the title.
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.

