← all repositories
vercel/ai-elements

Vercel's shadcn/ui extension for AI chat UIs

Pre-built React components for conversations, messages, and reasoning displays that install via CLI into your codebase.

2.1k stars TypeScript Chat AssistantsApp Builders
ai-elements
Velocity · 7d
+7.0
★ / day
Trend
steady
star history

What it does

AI Elements is a component registry that drops into your existing shadcn/ui setup and gives you React building blocks for AI interfaces—chat conversations, message bubbles, code blocks, reasoning displays, and the like. The CLI fetches components from a remote registry and copies them into your project, so you own and can edit the code.

The interesting bit

The clever part isn’t the components themselves; it’s the delivery mechanism. AI Elements piggybacks on shadcn/ui’s established CLI pattern, meaning you npx ai-elements@latest add message and get source code in your components/ directory, not a black-box npm dependency. It’s component distribution as infrastructure.

Key highlights

  • Installs via custom CLI or standard shadcn CLI pointing at a remote registry URL
  • Components land in your codebase (typically @/components/ai-elements/) for full customization
  • Auto-detects package manager (npm, pnpm, yarn, bun)
  • Requires Next.js + AI SDK + shadcn/ui already initialized
  • Supports CSS Variables mode only; no standard Tailwind config

Caveats

  • Next.js and AI SDK are hard prerequisites; this isn’t framework-agnostic
  • CSS Variables mode is mandatory, which may conflict with existing Tailwind setups
  • The README mentions “reasoning displays” but doesn’t elaborate on what that component actually renders

Verdict

Worth a look if you’re already committed to the Vercel stack (Next.js, AI SDK, shadcn/ui) and tired of hand-rolling chat UIs. If you’re on Remix, Vue, or a custom design system, this isn’t your shortcut.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.