JSPM

  • Created
  • Published
  • Downloads 391
  • Score
    100M100P100Q133733F
  • License MIT

Tavus conversational video AI <tavus-embed> custom element for the web.

Package Exports

  • @tavus/embed
  • @tavus/embed/package.json

Readme

@tavus/embed

Tavus experience as an inline <tavus-embed> custom element. Drop a single tag into any page and you get a fully working Tavus deployment in a shadow DOM — no React, no build step required.

Create and configure a deployment — and grab the embed snippet — in the Tavus PAL Maker.

Install

<script src="https://unpkg.com/@tavus/embed@latest"></script>

<tavus-embed deployment-id="YOUR_DEPLOYMENT_ID"></tavus-embed>

For a pinned version, use https://unpkg.com/@tavus/embed@0.1.0.

npm (bundler / framework apps)

npm install @tavus/embed
import "@tavus/embed";

Importing the package registers the <tavus-embed> custom element as a side effect. After that you can use the tag anywhere in your app's markup — including JSX:

<tavus-embed deployment-id="YOUR_DEPLOYMENT_ID" />

Attributes

Attribute Type Description
deployment-id string The Tavus deployment ID. Fetches configuration from /v2/deployments/:id/init.
override-config JSON Optional JSON object that is deep-merged over the fetched config.

Sizing

<tavus-embed> sets :host to width: 100%; height: 100%; max-height: 100vh; overflow: hidden. Give it a parent with a definite size, or wrap it in a container with aspect-ratio.

<div style="width: 720px; aspect-ratio: 16 / 9;">
  <tavus-embed deployment-id="YOUR_DEPLOYMENT_ID"></tavus-embed>
</div>

License

MIT