Package Exports
- vox-ai-react
- vox-ai-react/dist/index.esm.js
- vox-ai-react/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vox-ai-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@vox-ai/react
Official React component for VOX AI Chat Widget.
Installation
npm install @vox-ai/react
# or
yarn add @vox-ai/react
# or
pnpm add @vox-ai/reactQuick Start
import { VoxChat } from '@vox-ai/react';
function App() {
return (
<div>
<h1>My Website</h1>
<VoxChat apiKey="vox_live_xxxxxxxx" />
</div>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey |
string |
Required | Your VOX API key |
agentName |
string |
'VOX-01' |
Display name for the agent |
position |
'bottom-right' | 'bottom-left' |
'bottom-right' |
Widget position |
theme |
'dark' | 'light' | 'auto' |
'dark' |
Color theme |
buttonColor |
string |
Theme default | Custom button background color |
buttonSize |
number |
48 |
Button size in pixels |
borderRadius |
number |
0 |
Button border radius in pixels |
iconColor |
string |
Theme default | Custom icon color |
onOpen |
() => void |
- | Callback when chat opens |
onClose |
() => void |
- | Callback when chat closes |
onMessage |
(message, role) => void |
- | Callback for each message |
Customization Examples
Custom Colors
<VoxChat
apiKey="vox_live_xxxxxxxx"
buttonColor="#6366f1"
iconColor="#ffffff"
borderRadius={24}
/>Light Theme
<VoxChat
apiKey="vox_live_xxxxxxxx"
theme="light"
/>Auto Theme (follows system preference)
<VoxChat
apiKey="vox_live_xxxxxxxx"
theme="auto"
/>With Callbacks
<VoxChat
apiKey="vox_live_xxxxxxxx"
onOpen={() => console.log('Chat opened')}
onClose={() => console.log('Chat closed')}
onMessage={(msg, role) => console.log(`${role}: ${msg}`)}
/>Get Your API Key
Visit vox.ai/dashboard to get your API key.
License
MIT