ai-elements

Build AI chat interfaces with ai-elements React components for Next.js applications.

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill ai-elements-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-elements
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/ai-elements
Command: npx skills add https://github.com/zester4/zilmate --skill ai-elements-zester4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ai-elements, ai, @ai-sdk/react, zod, lucide-react, nanoid, media-chrome, and includes scripts (resource) and references (resource) components.

What problem does it solve? Building AI chat interfaces from scratch requires implementing conversations, message rendering, tool call displays, reasoning visualizations, and prompt inputs, which is repetitive and time-consuming for developers. ## Core Features & Use Cases - Pre-built AI Components: Install composable React components like Conversation, Message, ChainOfThought, CodeBlock, Artifact, Attachments, and AudioPlayer via a CLI into your own codebase. - AI SDK Integration: Components are designed to work directly with the Vercel AI SDK's useChat hook, tool types, and speech results. - Full Customization: Since component code lives in your project (built on shadcn/ui and Tailwind), you can modify styles and behavior directly. - Use Case: You are building a chatbot in a Next.js app and need a message list with markdown rendering, a collapsible chain-of-thought panel, and a code block with copy button — install the components with one CLI command each and compose them in your page. ## Quick Start Use the ai-elements skill to install the message and conversation components and build a basic AI chat interface in my Next.js project.

Frequently Asked Questions about ai-elements

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install ai-elements components in my Next.js project?

Run npx ai-elements@latest add <component> from your project root, substituting your package runner (pnpm dlx or bunx) as needed. Components are added to your components/ai-elements directory, and shadcn/ui is installed automatically if missing.

What components does ai-elements provide for AI chat UIs?

It provides Conversation, Message, PromptInput, ChainOfThought, CodeBlock, Artifact, Attachments, AudioPlayer, Agent, Checkpoint, Canvas, and more. Each is composable and documented in the references folder with usage examples.

Does ai-elements work with the Vercel AI SDK?

Yes, ai-elements is designed for the AI SDK. Components accept types like FileUIPart, Tool, and SpeechResult, and integrate directly with the useChat hook from @ai-sdk/react for message rendering.

Why are my ai-elements components not styled after installation?

Missing styles usually mean your project is not configured for shadcn/ui with Tailwind 4. Ensure your globals.css imports Tailwind and includes the shadcn/ui base styles, and that components.json is set up correctly.

Can I customize ai-elements component code after installing?

Yes, components are copied into your codebase rather than installed as a hidden library. You can edit files like components/ai-elements/message.tsx directly to change Tailwind classes, props, or behavior.

Why do ai-elements imports fail with module not found?

Check that the component file exists and that tsconfig.json defines a paths alias mapping @/* to ./*. Also confirm you ran the CLI from the project root where package.json lives.