Component ownership
Compose messages, citation cards, prompts, empty states, and controls from your own React components.
Connect React components to ChattyBox with @openstaticfish/chattybox. Your team controls rendering and state while managed infrastructure handles source-grounded answers, citations, and conversation continuity.
ChattyBox crawls your existing documentation, indexes the content for retrieval, and embeds a chatbot that answers using your docs instead of generic model memory.
Install the JavaScript SDK in your React application.
Create one Chattybox client outside the component render path.
Send messages from an event handler and update UI state with the response.
Render source links and handle structured ChattyboxError failures.
Three-step launch
Use the state, accessibility, styling, and design-system patterns your application already follows instead of adapting to a fixed widget shell.
Compose messages, citation cards, prompts, empty states, and controls from your own React components.
Use local state or your existing state layer while keeping conversations isolated between visitors.
Control focus, live regions, keyboard behavior, and error announcements within your application.
Keep the browser integration small while ChattyBox handles content indexing, retrieval, and cited answers.
Create the client once, call it from an event handler, and keep each visitor conversation ID in component or application state.
import { useState } from 'react';
import { Chattybox } from '@openstaticfish/chattybox';
const chattybox = new Chattybox({
apiKey: import.meta.env.VITE_CHATTYBOX_API_KEY,
baseUrl: import.meta.env.VITE_CHATTYBOX_API_URL,
});
export function Chat() {
const [answer, setAnswer] = useState('');
async function ask(message: string) {
const response = await chattybox.sendMessage({ message });
setAnswer(response.message);
}
return <div aria-live="polite">{answer}</div>;
}Understand the underlying client, response model, and infrastructure boundary.
Apply the React client inside an App Router client boundary.
Review conversation continuation and structured error handling.
Use the maintained script-based UI instead of building custom components.
Yes. The JavaScript SDK returns messages, conversation IDs, and source URLs so your React application can render a completely custom interface.
The SDK is intentionally headless. This lets teams use their own component library, accessibility behavior, state management, and product design.
Create it once outside the component render path or in a stable application provider rather than constructing a new client for every render.
Yes. Use the hosted widget installation guide when you want a maintained interface rather than custom React rendering.
No credit card required. Your content is not used for model training.
Free tier. No card needed.