Introduction
Why and when to use headless mode with ChatProvider.
Use headless mode when pre-built layouts are not enough and you need full UI control.
At the center is ChatProvider, which manages:
- streaming state
- thread list and selection
- message sending/cancelation
- persistence hooks
import { ChatProvider } from "@openuidev/react-headless";
export function App() {
return (
<ChatProvider apiUrl="/api/chat" threadApiUrl="/api/threads">
<MyCustomChat />
</ChatProvider>
);
}Next: