Skip to main content

Props

Types

The package exports these TypeScript types:

Examples

With dynamic variables

Pass context to your agent using dynamicVariables. These are sent to the ElevenLabs agent when a session starts:

With message logging

Track every message exchanged between the user and agent:

With call state tracking

Monitor the widget’s connection state:

Custom agent branding

If you don’t provide agentImageUrl, the widget automatically fetches the avatar from your ElevenLabs agent configuration.

Custom client tools

Register tools that the ElevenLabs agent can invoke during a conversation. These are merged with the built-in navigateToPage and scrollToSection tools:
Each tool function receives the parameters the agent passes and should return a string response (or undefined).

Hash router support

If your app uses a hash-based router (e.g. HashRouter from React Router), set routerType so the built-in navigation tools work correctly:

Built-in Client Tools

The widget registers two client tools that your ElevenLabs agent can call: Navigates the user to a different page within your app. Works with both browser and hash routers.

scrollToSection

Scrolls to and highlights a specific section on the page using a spotlight effect.
For scrollToSection to work, your page sections need id attributes (e.g. <section id="features">).

Styling

The widget renders all UI with inline styles and injects its own CSS animations. No external stylesheet import is required. The component accepts a className prop if you need to target it for layout purposes:
The widget uses a dark theme (#0d0d1a background) with an indigo/purple accent (#6366f1 to #7c3aed). To customize the appearance, you can override styles by targeting the widget’s fixed-position container: