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.

What is 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.

Overview of ai-elements

What it is

AI Elements is a component library and custom registry built on top of shadcn/ui. It provides pre-built, customizable React components designed for AI-native applications, including conversations, messages, code blocks, and reasoning displays. The project is maintained by Vercel and is intended to be used with Next.js projects that have the AI SDK and shadcn/ui initialized. Note that AI Elements is moving to shadcn/ui and will be deprecated at the end of November 2026, replaced by AI Elements from shadcn/ui. New projects should use the shadcn/ui version once available.

Key features

  • Pre-built React components for AI applications (conversation, message, code-block, etc.)
  • CLI tool for installing components via npx or shadcn CLI - Automatic detection of package manager (npm, pnpm, yarn, bun)
  • Components become part of the codebase for full customization - Integrates with existing shadcn/ui configuration and CSS Variables mode

Use cases

AI Elements is suitable for developers building AI-native web applications with Next.js. Use cases include creating chat interfaces with conversation and message components, displaying code blocks with syntax highlighting, showing reasoning or step-by-step AI outputs, and building custom AI-powered UIs that require tight integration with the AI SDK and shadcn/ui theming.

Getting started

Ensure your project meets prerequisites: Node.js 18+, Next.js with AI SDK installed, shadcn/ui initialized (npx shadcn@latest init), and Tailwind CSS configured in CSS Variables mode. Install all components: bash npx ai-elements@latest Install specific components: bash npx ai-elements@latest add message npx ai-elements@latest add conversation npx ai-elements@latest add code-block Alternatively, use the shadcn CLI: bash npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json

License and pricing

The license is not stated in the provided metadata or README. The project is categorized as open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/vercelai-elements.svg)](https://yunodb.com/tools/vercelai-elements?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/vercelai-elements?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/vercelai-elements.svg" alt="Featured on YunoDB" height="20"></a>