Streaming
Stream AI responses that read smoothly. Bursty chunks from the model are revealed at a steady pace that speeds up to catch up, with a soft fade on new words and a caret while it writes.
Add the Pro registry to components.json
components.json Add your token
Create a token on your account page and put it in
.env.localasHEXTAUI_PRO_TOKEN.Add the block
pnpm dlx shadcn@latest add @hextaui-pro/streaming
With the AI SDK
Render each text part of a useChat message. The part’s own state tells StreamingText when the model is still writing, so finished messages and history appear instantly.
With Markdown
Use the hook on its own to smooth the text before any renderer. Streamdown handles unfinished Markdown while it streams; react-markdown works the same way.
With any stream
Append each chunk to a string and pass it in. This works the same for fetch, OpenAI or Anthropic deltas, or server-sent events.
Code
3 files, added to components/blocks/streaming.