
Ai Elements Chatbot
- 196 repo stars
- Updated July 25, 2026
- secondsky/claude-skills
Build conversational chat UIs with shadcn/ui AI components — streaming chat, tool/function displays, and reasoning visualization.
About
Skill providing shadcn/ui AI chat components for conversational interfaces, including streaming chat, tool/function displays, and reasoning visualization. A developer uses it when assembling AI chat UIs and handling Next.js App Router setup, Tailwind v4, or AI SDK v5 migration issues.
- shadcn/ui AI components
- Streaming chat UI
- Tool/function call displays
- Reasoning visualization
Ai Elements Chatbot by the numbers
- Data as of Jul 28, 2026 (Skillselion catalog sync)
/plugin marketplace add secondsky/claude-skills/plugin install ai-elements-chatbot@claude-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| repo stars | ★ 196 |
|---|---|
| Last updated | July 25, 2026 |
| Repository | secondsky/claude-skills ↗ |
What it does
Build conversational chat UIs with shadcn/ui AI components — streaming chat, tool/function displays, and reasoning visualization.
README.md
AI Elements Chatbot Components
Status: Production Ready ✅ Last Updated: 2025-11-07 Production Tested: Used in multiple AI chatbot projects with Vercel AI SDK v5
Auto-Trigger Keywords
Claude Code automatically discovers this skill when you mention:
Primary Keywords
- ai-elements
- ai elements
- vercel ai elements
- shadcn ai
- shadcn/ai
- chat components
- chatbot ui
- conversational ai
- ai chat interface
- streaming chat
- ai sdk ui components
Secondary Keywords
- message component
- conversation component
- response component
- prompt input
- tool calling ui
- reasoning display
- thinking display
- source citations
- perplexity style
- claude artifacts
- code highlighting
- web preview
- branch navigation
- ai function calling
- streaming responses
- markdown streaming
- chat actions
- copy regenerate
- voice input
- speech to text
Error-Based Keywords
- "PromptInputSpeechButton not working"
- "voice input not working firefox"
- "ai elements not found"
- "component not found @/components/ui/ai"
- "AI SDK v5 migration"
- "useChat messages undefined"
- "multiple thinking elements"
- "reasoning block duplicate"
- "maximum update depth exceeded"
- "copy button returns html"
- "tailwind v4 css variables"
- "streaming not working"
- "prompt input not responsive"
What This Skill Does
Production-ready AI chat UI components built on shadcn/ui for conversational AI interfaces. Provides 30+ pre-built components optimized for Vercel AI SDK v5, including streaming responses, tool/function call displays, reasoning visualization, and source citations following the shadcn/ui copy-paste model.
Core Capabilities
✅ Complete Chat Interface - Message, Conversation, Response, PromptInput components with auto-scroll and streaming ✅ Tool Calling Visualization - Display function/tool calls with args, results, and status tracking ✅ Reasoning Display - Show AI's thinking process (Claude-style thinking, o1-style reasoning) ✅ Source Citations - Perplexity-style inline citations with expandable source list ✅ Code Highlighting - Syntax-highlighted code blocks with copy functionality ✅ Voice Input - Speech-to-text integration (with browser compatibility handling) ✅ Actions - Copy, regenerate, edit, delete message actions ✅ Advanced Features - Branch navigation, task lists, image display, web previews (Claude artifacts)
Known Issues This Skill Prevents
| Issue | Why It Happens | Source | How Skill Fixes It |
|---|---|---|---|
| Voice input broken in Firefox/Safari | Web Speech API only in Chromium browsers | #210 | Conditional rendering based on browser support |
| PromptInput not responsive on mobile | Missing responsive min-height constraints | #153 | Adds responsive classes to template |
| Multiple thinking blocks duplicate | Streaming creates separate components per chunk | #106 | Client-side merging of reasoning chunks |
| Component not found after install | AI Elements not initialized or wrong registry | Common user error | Verification steps in setup process |
| AI SDK v5 breaking changes | v5 has different API from v4 | Migration docs | Documents all v5 changes with examples |
| Maximum update depth exceeded | Unstable callbacks cause re-render loop | #97 | Memoization pattern for callbacks |
| Copy returns HTML not markdown | Actions.Copy uses innerHTML by default | #180 | Pass raw markdown with format prop |
| Tailwind v4 CSS broken | Missing CSS variables or wrong @theme config | Common with v4 migration | Links to tailwind-v4-shadcn skill for fix |
When to Use This Skill
✅ Use When:
- Building ChatGPT-style conversational AI interfaces
- Need production-ready chat UI components (not building from scratch)
- Using Vercel AI SDK v5 with streaming responses
- Require tool/function calling visualization
- Want reasoning process display (thinking indicators)
- Building AI apps with source citations and context
- Need auto-scrolling conversation containers with streaming
- Require code syntax highlighting with copy functionality
- Building multi-turn conversation interfaces
- Want voice input (speech-to-text) capabilities
❌ Don't Use When:
- Building non-chat AI UIs (dashboards, data visualization)
- Using AI SDK v4 or older (breaking changes in v5)
- Using frameworks other than Next.js (currently Next.js only)
- Want complete custom control over every component detail
- Using different component libraries (Material-UI, Chakra, Ant Design)
- Building server-side only applications (no client-side streaming)
Quick Usage Example
# 1. Verify prerequisites (Next.js 15+, AI SDK v5, shadcn/ui)
npx next --version && npm list ai && ls components/ui
# 2. Initialize AI Elements
pnpm dlx ai-elements@latest init
# 3. Add core chat components
pnpm dlx ai-elements@latest add message conversation response prompt-input
# 4. Create chat page (see SKILL.md for full code)
# app/chat/page.tsx with useChat() hook
# 5. Create API route (see SKILL.md for full code)
# app/api/chat/route.ts with streamText()
Result: Working chat interface with streaming responses, auto-scroll, auto-resizing input, and role-based styling
Full instructions: See SKILL.md
Package Versions (Verified 2025-11-07)
| Package | Version | Status |
|---|---|---|
| ai-elements | 1.6.0 | ✅ Latest stable (released today) |
| ai | 5.0+ | ✅ Latest stable |
| next | 15.0+ | ✅ Latest stable |
| react | 19.2+ | ✅ Latest stable |
| @tailwindcss/vite | 4.1.14 | ✅ Latest stable |
Dependencies
Prerequisites:
- tailwind-v4-shadcn (required) - Sets up Tailwind v4 + shadcn/ui foundation
- ai-sdk-ui (companion) - Provides AI SDK hooks (useChat, useCompletion)
- nextjs (framework) - Next.js 15 with App Router
Integrates With:
- ai-sdk-core (optional) - Backend AI SDK integration for API routes
- clerk-auth (optional) - Add user authentication to chat
- cloudflare-d1 (optional) - Store chat history in database
- tanstack-query (optional) - Additional state management
File Structure
ai-elements-chatbot/
├── SKILL.md # Complete documentation with all 30+ components
├── README.md # This file (quick reference)
├── scripts/ # Setup automation
│ └── setup-ai-elements.sh
├── references/ # Detailed documentation
│ ├── component-catalog.md
│ ├── migration-v4-to-v5.md
│ └── common-patterns.md
└── assets/ # Ready-to-use templates
├── chat-interface-starter.tsx
├── api-route-template.ts
└── components.json
Official Documentation
- AI Elements: https://www.shadcn.io/ai
- Vercel AI SDK: https://sdk.vercel.ai/docs
- shadcn/ui: https://ui.shadcn.com
- Next.js: https://nextjs.org/docs
- GitHub Repository: https://github.com/vercel/ai-elements
- Context7 Library:
/vercel/ai-elements(if available)
Related Skills
- tailwind-v4-shadcn (prerequisite) - Tailwind v4 + shadcn/ui setup required before AI Elements
- ai-sdk-ui (companion) - React hooks for AI SDK (useChat, useCompletion, useAssistant)
- ai-sdk-core (optional) - Backend AI SDK integration for building API routes
- nextjs (framework) - Next.js App Router setup if starting from scratch
- clerk-auth (optional) - Add user authentication and sessions to chat
- better-chatbot-patterns (alternative) - Different chatbot UI patterns if not using Vercel AI SDK
Contributing
Found an issue or have a suggestion?
- Open an issue: https://github.com/secondsky/claude-skills/issues
- See SKILL.md for detailed documentation
License
MIT License - See main repo LICENSE file
Production Tested: Multiple AI chatbot projects using Vercel AI SDK v5 with streaming, tool calling, and reasoning displays Token Savings: ~68% (25,000 → 8,000 tokens) Error Prevention: 100% (8 documented issues prevented) Ready to use! See SKILL.md for complete setup guide and all 30+ components.