Examples
All examples are in the GitHub repo (opens in a new tab) and runnable locally.
Minimal
The smallest possible integration — useAIChat wired to plain HTML inputs. No UI package. Shows the core primitive.
cd apps/nextjs-basic
cp .env.local.example .env.local # add GROQ_API_KEY
pnpm devCustom UI (Tailwind)
useAIChat wired to a fully custom Tailwind UI — model switcher sidebar, custom message bubbles with avatars, auto-expanding textarea. No @react-ai-stream/ui dependency.
This is the key example for teams using shadcn/ui, Chakra, or any design system.
cd apps/custom-ui
cp .env.local.example .env.local # add GROQ_API_KEY
pnpm devMulti-model
Three models streaming in parallel — the live demo at react-ai-stream-example.vercel.app (opens in a new tab).
cd apps/example
cp .env.local.example .env.local # add GROQ_API_KEY
pnpm dev