ai-elements

Installs and configures AI Elements React components for building AI chat interfaces.

Updated May 26, 2026
One-click install
npx skills add https://github.com/Albo-Club/albo-os --skill ai-elements-albo-club
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-elements
Source: https://github.com/Albo-Club/albo-os/tree/main/.agents/skills/ai-elements
Command: npx skills add https://github.com/Albo-Club/albo-os --skill ai-elements-albo-club

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building AI chat interfaces from scratch requires designing conversations, message rendering, tool call displays, and prompt inputs, which is repetitive UI work. This Skill guides the installation and usage of AI Elements, a component library on top of shadcn/ui, so you can assemble AI-native chat UIs from pre-built components. ## Core Features & Use Cases - Component Installation: Install AI Elements components via the AI Elements CLI or the shadcn/ui CLI into your project's components directory. - Chat UI Composition: Compose conversations, messages, message content, and response rendering with the AI SDK's useChat hook. - Customization & Troubleshooting: Modify component source directly in your codebase and resolve common issues like missing styles, module resolution, and theme switching. - Use Case: You are adding an AI assistant sidebar to a React app. Use this Skill to install the message and conversation components, wire them to useChat, and render streamed model responses. ## Quick Start Ask the assistant to install the AI Elements message and conversation components and build a chat interface connected to the AI SDK useChat hook.

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 project?

Run the AI Elements CLI with your project's package runner, such as npx ai-elements@latest, pnpm dlx ai-elements@latest, or bunx ai-elements@latest. Components are added to your components directory, typically under @/components/ai-elements/.

How do I render chat messages with AI Elements and the AI SDK?

Import Message, MessageContent, and MessageResponse from your ai-elements directory and map over the messages returned by the useChat hook from @ai-sdk/react. Render text parts inside MessageResponse for each message.

What are the prerequisites for using AI Elements?

You need Node.js 18 or later, a Next.js project with the Vercel AI SDK installed, and shadcn/ui configured. Running an install command will automatically set up shadcn/ui if it is missing.

Why are my AI Elements components not styled?

Unstyled components usually mean your project is not configured for shadcn/ui with Tailwind CSS v4. Ensure your globals.css imports Tailwind and includes the shadcn/ui base styles.

Why do AI Elements imports fail with module not found?

Module not found errors occur when the tsconfig.json paths alias for @/ is missing or incorrect. Add a baseUrl and a paths entry mapping @/* to ./* in compilerOptions, then verify the component file exists.

Can I customize AI Elements component code?

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 classes, props, or behavior.