This skill provides comprehensive documentation for all 23 Vercel AI Elements components organized by category (Message, Conversation, Input/Interaction, Content Display, AI Processing, Advanced Features). Use when users ask about building AI chatbots, need component documentation, want API references for Vercel AI Elements, or need integration examples with the AI SDK.
This skill provides complete documentation for Vercel AI Elements - a comprehensive UI component library for building conversational AI interfaces with the Vercel AI SDK. It covers 23 production-ready React components organized into 6 functional categories, from basic message display to advanced features like web previews and tool execution.
Use this skill when users need:
The Vercel AI Elements library provides components across 6 functional categories:
Display chat messages with variants (contained/flat), automatic alignment, avatars, and markdown support. Perfect for rendering user and assistant messages in conversational interfaces.
Components: Message, MessageContent, MessageAvatar
Reference: references/vercel-ai-elements-message-components.md
Wrap and manage message lists with automatic scrolling, scroll-to-bottom buttons, and empty states. Handles the container and layout for multi-message conversations.
Components: Conversation, ConversationContent, ConversationEmptyState, ConversationScrollButton
Reference: references/vercel-ai-elements-conversation-management.md
Enable user input with file attachments, model selection, suggestions, and task lists. Covers all user interaction patterns for sending messages and managing workflows.
Components: Actions, Prompt Input (with subcomponents), Suggestion, Task
Reference: references/vercel-ai-elements-input-interaction.md
Render generated content including code, images, markdown responses, and structured artifacts. Handles all types of content output from AI models.
Components: Artifact, CodeBlock, Image, Response
Reference: references/vercel-ai-elements-content-display.md
Visualize AI processing steps including branching conversations, reasoning chains, loading states, execution plans, and shimmer effects. Shows the "thinking" process.
Components: Branch, Chain of Thought, Loader, Plan, Reasoning, Shimmer
Reference: references/vercel-ai-elements-ai-processing.md
Specialized components for context tracking, citations, tool execution, source attribution, web previews, and cross-platform sharing.
Components: Context, Inline Citation, Open In Chat, Queue, Sources, Tool, Web Preview
Reference: references/vercel-ai-elements-advanced-features.md
When a user asks about a specific component:
references/Combine Message + Conversation + PromptInput + Response to build a basic chatbot UI.
Add Actions component to Message components for retry, copy, and regenerate functionality.
Use Reasoning, ChainOfThought, or Plan to show AI's thinking process during streaming.
Combine Artifact, CodeBlock, Image, and Response for generating complex multi-media content.
Add OpenInChat to allow users to copy conversations to ChatGPT, Claude, etc.
All components are designed to work with @ai-sdk/react hooks like:
useChat() - for message managementuseCompletion() - for streaming textexperimental_useObject() - for structured outputsReference files include complete AI SDK integration examples for each component category.
All components use the same installation pattern:
npx ai-elements@latest add [component-name]
Where component names are lowercase with hyphens, e.g., prompt-input, code-block, chain-of-thought.
Each component reference file includes comprehensive props tables with:
Many components have built-in streaming support:
All components have full type definitions for TypeScript projects.
Components include proper ARIA labels, keyboard navigation, and semantic HTML.
All components adapt to different screen sizes with mobile-friendly interactions.
Components use CSS custom properties and currentColor for automatic theme support.
Most components use compound component patterns (parent + child components) for flexible composition.
Use the reference files to search for:
The Response component requires this CSS addition:
@source "../node_modules/streamdown/dist/index.js";
Most components assume use of the AI SDK with proper backend routes. Reference files include backend example code.
Many components depend on shadcn/ui primitives and icons from lucide-react. Users need these dependencies installed.
The Branch component manages UI for multiple message branches but doesn't implement branching in the AI SDK - that requires custom backend logic.
vercel-ai-elements-message-components.md - Message displayvercel-ai-elements-conversation-management.md - Conversation containersvercel-ai-elements-input-interaction.md - User input and actionsvercel-ai-elements-content-display.md - Content renderingvercel-ai-elements-ai-processing.md - Processing UI and visualizationvercel-ai-elements-advanced-features.md - Specialized componentsEach reference file contains:
All reference files are organized by category for quick lookup when users ask about specific components or features.
下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer