Skip to main content

Overview

@tavus/cvi-ui is a CLI that copies React components, hooks, styles, and optional server helpers into your application. It is not a hosted widget or a runtime CDN package. After you run init and add ..., you import the generated files from your own project tree and can edit them like application code. Use this path when you want Tavus-provided React UI and Daily-powered call state without building every media control yourself. For the fastest no-code UI, use an iframe embed. For fully custom Daily call-object ownership, use the Daily JS / React path.

Blocks

Complete layouts such as Conversation and HairCheck.

Components

Building blocks such as CVIProvider, media controls, captions, chat, and AudioWave.

Hooks

React hooks for call lifecycle, media state, participants, captions, chat, and CVI events.

Server

Server routes and browser helpers that create and end conversations without exposing TAVUS_API_KEY.

Mental model

Generated imports are relative to where the CLI copied files in your app. Examples in these docs use paths such as ./components/cvi/components/conversation; adjust them if your cvi-components.json components path is different.

Quick Start

Prerequisites

Before getting started, ensure you have a React project set up. Alternatively, you can start from our example project: CVI UI Haircheck Conversation Example - this example already has the HairCheck and Conversation blocks set up.

1. Initialize CVI in Your Project

This command:
  • Creates cvi-components.json, which stores the generated component path and TypeScript preference.
  • Prompts for TypeScript preference.
  • Installs @daily-co/daily-react, @daily-co/daily-js, and jotai.

2. Add CVI Components and Server Helpers

add conversation generates the Conversation block and the components/hooks it needs. add tavus-api generates a framework-specific backend route plus lib/tavus-client.ts, which exports createTavusConversation(params?) and endTavusConversation(id). For Vite projects with a server runtime, use:
Plain client-only Vite is unsupported because it would require exposing TAVUS_API_KEY in browser JavaScript. Add a server runtime and use tavus-api-vite-ssr, or create your own backend route.

3. Wrap Your App with the CVI Provider

In your root directory (main.tsx or index.tsx):

4. Add a Conversation Component

Learn how to create a conversation URL at https://docs.tavus.io/api-reference/conversations/create-conversation. To create a conversation URL from your app without exposing your TAVUS_API_KEY in the browser, use the server helpers in Server (tavus-api for Next.js/Remix/TanStack Start, or tavus-api-vite-ssr for Vite-with-server). Note: The Conversation component requires a parent container with defined dimensions to display properly.
Ensure your body element has full dimensions (width: 100% and height: 100%) in your CSS for proper component display.

Complete React example

This example assumes you ran:
Set TAVUS_API_KEY only in your server environment. The browser code below calls the generated createTavusConversation and endTavusConversation helpers; those helpers call your generated /api/tavus route.
Conversation needs a parent with defined dimensions. Give the parent an explicit height, or ensure the full chain (html, body, root element, and container) resolves to a real height.

Documentation Sections

  • Blocks – High-level component compositions and layouts
  • Components – Individual UI components
  • Hooks – Custom React hooks for managing video call state and interactions
  • Server – Server-side helpers (tavus-api, tavus-api-vite-ssr) for creating and ending conversations without exposing your API key