
The React Toolkit
for AI Chat
Streaming hooks. Streaming markdown. Zero flicker. A lightweight toolkit to build real-time AI chat interfaces from any backend.
Two packages. One pipeline.
Stream data with @deltakit/react, render it with @deltakit/markdown.
One hook to manage messages, SSE parsing, cancellation, and real-time state updates.
const { messages, sendMessage, isLoading, stop } = useStreamChat({ api: "/api/chat",});Incremental markdown renderer. Tokens are appended character-by-character — zero flicker, zero re-parsing.
<StreamingMarkdown content={text} />Everything you need
From basic text streaming to custom tool calls, typed event handling, and flicker-free markdown — all with a minimal API surface.
Real-time SSE Streaming
Stream AI responses token-by-token over Server-Sent Events with automatic state management.
Zero-Flicker Rendering
Tokens are appended incrementally without reparsing. No layout jumps, no re-renders.
Tool Call Rendering
Built-in support for server-side tool calls with loading states and results out of the box.
Incremental State Machine
A character-level parser that only processes new input. No diffing, no virtual DOM overhead.
Type-Safe Events
Custom onEvent callback with full TypeScript support and EventHelpers API.
Custom Components
Replace any rendered element — headings, code blocks, links — with your own React components.
Custom Content Parts
Extend beyond text with custom part types — images, citations, status indicators.
Zero Config Defaults
Both packages work immediately out of the box. Add customization as needed.
Get started in seconds
npm install @deltakit/react @deltakit/markdown