HomeBookmarks
AI ElementsAI Elements
AI Elements

AI Elements

A component library and custom registry built on top of shadcn/ui to help you build AI-native applications faster.

Vercelby Vercel
10components178.3Kviews524bookmarks

Installs all 49 components. Without our CLI, run instead.

Auto-indexed

AI Elements contents

  • Task

    Task

  • Suggestion

    Suggestion

  • Sources

    Sources

  • Message

    Message

  • Loader

    Loader

  • Inline Citation

    Inline Citation

  • Conversation

    Conversation

  • Code Block

    Code Block

  • Actions

    Actions

  • Announcement

    Announcement

  • That's all 10 components

    About AI Elements

    AI Elements publishes a shadcn registry at ai-sdk.dev, with 49 components installable through the shadcn CLI.

    Components
    49
    GitHub stars
    2,497
    Last commit
    Oct 14, 2026
    Repository
    vercel/ai-elements

    Also in the AI Elements registry

    Copy a prompt for your agent, copy the install command, or open the docs that ship it.

    • Agent

      AI-powered agent component.

      1 file
    • Attachments

      AI-powered attachments component.

      1 file
    • Audio Player

      audio-player

      AI-powered audio player component.

      1 file
    • Canvas

      AI-powered canvas component.

      1 file
    • Chain Of Thought

      chain-of-thought

      AI-powered chain of-thought component.

      1 file
    • Checkpoint

      AI-powered checkpoint component.

      1 file
    • Commit

      AI-powered commit component.

      1 file
    • Confirmation

      AI-powered confirmation component.

      1 file
    • Connection

      AI-powered connection component.

      1 file
    • Context

      AI-powered context component.

      1 file
    • Edge

      AI-powered edge component.

      1 file
    • File Tree

      file-tree

      AI-powered file tree component.

      1 file
    • Image

      AI-powered image component.

      1 file
    • Jsx Preview

      jsx-preview

      AI-powered jsx preview component.

      1 file
    • Mic Selector

      mic-selector

      AI-powered mic selector component.

      1 file
    • Model Selector

      model-selector

      AI-powered model selector component.

      1 file
    • Node

      AI-powered node component.

      1 file
    • Open In Chat

      open-in-chat

      AI-powered open in-chat component.

      1 file
    • Package Info

      package-info

      AI-powered package info component.

      1 file
    • Panel

      AI-powered panel component.

      1 file
    • Persona

      AI-powered persona component.

      1 file
    • Plan

      AI-powered plan component.

      1 file
    • Prompt Input

      prompt-input

      AI-powered prompt input component.

      1 file
    • question

    • Queue

      AI-powered queue component.

      1 file
    • Reasoning

      AI-powered reasoning component.

      1 file
    • Sandbox

      AI-powered sandbox component.

      1 file
    • Schema Display

      schema-display

      AI-powered schema display component.

      1 file
    • Shimmer

      AI-powered shimmer component.

      1 file
    • Snippet

      AI-powered snippet component.

      1 file
    • Stack Trace

      stack-trace

      AI-powered stack trace component.

      1 file
    • Terminal

      AI-powered terminal component.

      1 file
    • Test Results

      test-results

      AI-powered test results component.

      1 file
    • Tool

      AI-powered tool component.

      1 file
    • Toolbar

      AI-powered toolbar component.

      1 file
    • Transcription

      AI-powered transcription component.

      1 file
    • Voice Selector

      voice-selector

      AI-powered voice selector component.

      1 file
    • Web Preview

      web-preview

      AI-powered web preview component.

      1 file

    From the AI Elements readme

    ▲ AI Elements

    [!WARNING] AI Elements is moving to shadcn/ui. This project will be deprecated at the end of November 2026 and replaced by AI Elements from shadcn/ui. New projects should use the shadcn/ui version once it's available.

    AI Elements is a component library built on top of shadcn/ui to help you build AI-native applications faster.

    Overview

    AI Elements provides pre-built, customizable React components specifically designed for AI applications, including conversations, messages, code blocks, reasoning displays, and more. The CLI makes it easy to add these components to your Next.js project.

    Installation

    You can use the AI Elements CLI directly with npx, or install it globally:

    # Use directly (recommended)
    npx ai-elements@latest
    
    # Or using shadcn cli
    npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json
    

    Prerequisites

    Before using AI Elements, ensure your project meets these requirements:

    • Node.js 18 or later
    • Next.js project with AI SDK installed
    • shadcn/ui initialized in your project (npx shadcn@latest init)
    • Tailwind CSS configured (AI Elements supports CSS Variables mode only)

    Usage

    Install All Components

    Install all available AI Elements components at once:

    npx ai-elements@latest
    

    This command will:

    • Set up shadcn/ui if not already configured
    • Install all AI Elements components to your configured components directory
    • Add necessary dependencies to your project

    Install Specific Components

    Install individual components using the add command:

    npx ai-elements@latest add 
    

    Examples:

    # Install the message component
    npx ai-elements@latest add message
    
    # Install the conversation component
    npx ai-elements@latest add conversation
    
    # Install the code-block component
    npx ai-elements@latest add code-block
    

    Alternative: Use with shadcn CLI

    You can also install components using the standard shadcn/ui CLI:

    # Install all components
    npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json
    
    # Install a specific component
    npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/message.json
    

    Quick Start Example

    After installing components, you can use them in your React application:

    "use client";
    
    import { useChat } from "@ai-sdk/react";
    import {
      Conversation,
      ConversationContent,
    } from "@/components/ai-elements/conversation";
    import {
      Message,
      MessageContent,
      MessageResponse,
    } from "@/components/ai-elements/message";
    
    export default function Chat() {
      const { messages } = useChat();
    
      return (
        
          
            {messages.map((message, index) => (
              
                
                  {message.content}
                
              
            ))}
          
        
      );
    }
    

    How It Works

    The AI Elements CLI:

    1. Detects your package manager (npm, pnpm, yarn, or bun) automatically
    2. Fetches component registry from https://elements.ai-sdk.dev/api/registry/registry.json
    3. Installs components using the shadcn/ui CLI under the hood
    4. Adds dependencies and integrates with your existing shadcn/ui setup

    Components are installed to your configured shadcn/ui components directory (typically @/components/ai-elements/) and become part of your codebase, allowing for full customization.

    Configuration

    AI Elements uses your existing shadcn/ui configuration. Components will be installed to the directory specified in your components.json file.

    Recommended Setup

    For the best experience, we recommend:

    1. AI Gateway: Set up Vercel AI Gateway and add AI_GATEWAY_API_KEY to your .env.local
    2. CSS Variables: Use shadcn/ui's CSS Variables mode for theming
    3. TypeScript: Enable TypeScript for better development experience

    Contributing

    If you'd like to contribute to AI Elements, please follow these steps:

    1. Fork the repository
    2. Create a new branch
    3. Make your changes to the components in packages/elements.
    4. Open a PR to the main branch.

    Made with ❤️ by Vercel

    Read the rest on GitHub →

    What AI Elements shipped recently

    Every appearance and removal our crawl has seen in the registry index.

    • example-questionaddedOct 15, 2026
    • example-question-freeformaddedOct 15, 2026
    • example-question-multi-selectaddedOct 15, 2026
    • example-question-single-selectaddedOct 15, 2026
    • questionaddedOct 15, 2026

    Registries like AI Elements

    Prompt Kit

    Prompt Kit

    by Julien Thibeaut

    9

    components

    ElevenLabs UI

    ElevenLabs UI

    by ElevenLabs

    7

    components

    Kokonut UI

    Kokonut UI

    by Kokonut UI

    60

    components

    simple-ai

    simple-ai

    by simple-ai

    8

    components

    Agent Elements

    Agent Elements

    by 21st

    22

    components

    Browse every shadcn registry we track →

    Pace UI

    Pace UI

    by Pace UI

    12

    components

    1. Components
    2. /
    3. Vercel
    4. /
    5. AI Elements

    Related libraries

    Ruixen UI

    Ruixen UI

    by Ruixen UI

    347

    components

    shadcn/ui

    shadcn/ui

    by shadcn

    87

    components

    Efferd

    Efferd

    by Efferd

    114

    components

    Aceternity UI

    Aceternity UI

    by Manu Arora

    89

    components

    Shadcnblocks.com

    Shadcnblocks.com

    by Shadcnblocks.com

    29

    components

    Base UI

    Base UI

    by MUI

    28

    components

    About AI Elements

    AI Elements is a component library on 21st.dev by Vercel with 10 public React components. Every component ships with a live interactive preview and full TSX source — copy the code, install it through the shadcn CLI, or pull it into Cursor or Claude Code over MCP.

    All 10 AI Elements components

    • Actions
    • Announcement
    • Code Block
    • Conversation
    • Inline Citation
    • Loader
    • Message
    • Sources
    • Suggestion
    • Task

    Browse all component libraries →