Aller au contenu

DOCS

Chat UI

Four packages, one shell. Import styles.css, pass endpoints and the embed token, and mount SvedaChat.

One widget, four packages

Vue, React, Svelte, and Solid mount the same chat. History, view mode, and resize stay on the widget. @sveda-ai/core still sends the turn when you skip the panel.

Packages

Pick one UI package. Each one mounts the same chat on an empty element, usually #sveda-widget. Import that package’s styles.css once. @sveda-ai/chat is the headless store those packages already depend on — install it only if you build your own shell. No framework: @sveda-ai/element. Turns without a panel stay on @sveda-ai/core.

npm i @sveda-ai/vue
npm i @sveda-ai/react
npm i @sveda-ai/svelte
npm i @sveda-ai/solid

Same shell

History opens a sidebar. Maximize enters immersive mode. The panel button switches floating and fixed. X minimizes. Drag the left edge in fixed mode, or the left edge, top edge, and corner in floating mode. A new empty chat stays a tab until it has a user message. Options match the JS client: endpoints.stream is required, headers carries x-sveda-embed-token, and appearance overlays sveda.yaml. The option list — endpoints, headers, models, quick prompts, appearance, and SvedaChat props — is on each package page.

The panel is optional.

session.send on @sveda-ai/core is the turn. These packages only draw it.

JS client