An embeddable chat widget for design systems. Users can request and preview interactive UI components through chat.
- Embeddable widget component
- Streaming responses (word-by-word)
- Interactive component rendering
- Persistent chat history (localStorage)
- Lazy-loaded components
- Error handling
npm install
npm run devpython -m venv myenv
source myenv/bin/activate
uv run uvicorn main:app --reloadimport { ChatWidget } from "@/components/ChatWidget";
function App() {
return (
<div>
<ChatWidget
apiUrl={"http://localhost:8000"}
theme={"light"}
position={"bottom-right"}
/>
</div>
);
}npm install
npm run build:widgetpython -m venv myenv
source myenv/bin/activate
uv run uvicorn main:app --reload- Head to dist/index.html
- Chat button in bottom-right corner
- Opens/closes chat panel
- Self-contained component
- Message list (user and assistant)
- Input box and Send button
- Loading states
- Scrollable history with auto-scroll
- Error handling
- IndexDb for chat history
- Auto-save on message changes
- Restore on page refresh
- Clear history option
- Word-by-word streaming via async generators
- 50ms delay between words
- Incremental UI updates
- Error handling
- Renders interactive Button components from Material UI, Antd , etc
- Lazy-loaded components
- Example queries: "Show me button components", "Display chat bubble variations"
- React 18 with TypeScript
- Vite
- Tailwind CSS
- Absolute imports (@/ alias)
- React.lazy() for code splitting
- Direction A and B
- Working on Direction C
- Lazy loading for UI components
- Code splitting with React.lazy()
- Suspense boundaries
- Bundle optimizations with vite manual chunking for libraries,
- AI/LLM integration for gettin json structure for components
- Fixed component set for libraries
- More libraries integration
- Read from LLM agents and web libraries
- Backend chat history sync
- User authentication
- Analytics
- Component code preview
MIT