
AI Elements
Builds AI chat UIs from ai-elements parts such as messages and prompt inputs.
Install
npx skills add trycompai/crm --skill ai-elements -g -a claude-code -y- Repository
- trycompai/crm11.8k
- Category
- Engineering
- Updated
- 4d ago
- License
- MIT
- Context cost
- Mediumabout 1,741 tokens
- Runs scripts
- No, instructions only
What it does
Build AI chat interfaces using ai-elements components, conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
AI Elements
AI Elements is a component library and custom registry built on top of shadcn/ui to help you build AI-native applications faster. It provides pre-built components like conversations, messages and more.
Installing AI Elements is straightforward and can be done in a couple of ways. You can use the dedicated CLI command for the fastest setup, or integrate via the standard shadcn/ui CLI if you've already adopted shadcn's workflow.
IMPORTANT: Run all CLI commands using the project's package runner:
npx ai-elements@latest,pnpm dlx ai-elements@latest, orbunx --bun ai-elements@latest, based on the project'spackageManager. Examples below usenpx ai-elements@latestbut substitute the correct runner for the project.
Prerequisites
Before installing AI Elements, make sure your environment meets the following requirements:
- Node.js, version 18 or later
- A Next.js project with the AI SDK installed.
- shadcn/ui installed in your project. If you don't have it installed, running any install command will automatically install it for you.
- We also highly recommend using the AI Gateway and adding
AI_GATEWAY_API_KEYto yourenv.localso you don't have to use an API key from every provider. AI Gateway also gives $5 in usage per month so you can experiment with models. You can obtain an API key here.
Installing Components
You can install AI Elements components using either the AI Elements CLI or the shadcn/ui CLI. Both achieve the same result: adding the selected component’s code and any needed dependencies to your project.
