AI Elements Is Being Deprecated: What to Do With the Code You Copied

Short answer: AI Elements from elements.ai-sdk.dev is being deprecated at the end of November 2026 and replaced by AI Elements in shadcn/ui. The components you installed were copied into your project, so they keep working as they are. You don't have to migrate. You only have to decide what to do about the handful of elements shadcn/ui did not rebuild, and where new patterns come from.
What changed
The AI Elements repository now carries a notice that the project is moving to shadcn/ui and will be deprecated at the end of November 2026. The patterns now live in the shadcn/ui docs, rebuilt on shadcn/ui components such as Trace, Code Block and Message Scroller.
Most files have a direct replacement: message.tsx becomes Message, conversation.tsx becomes Chat, prompt-input.tsx becomes Prompt Input, confirmation.tsx becomes Confirmation, and so on. The full table is on the shadcn/ui AI Elements page.
Do you have to migrate?
No. shadcn/ui says so directly: the code was copied into your project, it is yours, and it keeps working. Nothing is fetched at runtime, so the deprecation can't break a build.
Move a file when you are already changing it. If you are about to restyle the chat, add a tool view or fix a bug in queue.tsx, that is the cheap moment to move it onto the shadcn/ui version, so your components share one set of building blocks.
Leave it when it works and nobody touches it. A deprecated file that never changes costs nothing.
Moving one file
Each pattern page in the shadcn/ui docs has a migration prompt. You paste it into your coding agent, and it rebuilds that file in components/ai-elements on shadcn/ui components while keeping every export and its props, so the code that imports it doesn't change.
Do one file per change, run the app, and check the states that matter for that file: streaming, empty, error. A rebuilt file that looks right while idle can still break mid-stream.
What was not rebuilt
shadcn/ui did not rebuild 23 of the files, seven of them the React Flow canvas pieces, because few people used them. Your copies keep working, and the docs suggest which shadcn/ui parts to build each one from. If you depend on one, these are your options:
| File | Build it from | Or use |
|---|---|---|
audio-player.tsx, transcription.tsx |
an audio element with Button Group and Slider; a Button per transcript segment | Detent Voice note (free, MIT) |
artifact.tsx, canvas.tsx and the React Flow files |
Card, Button and Tooltip; React Flow for the canvas | Detent Agent canvas (Pro) |
mic-selector.tsx, voice-selector.tsx |
Combobox | |
web-preview.tsx |
an iframe with Input Group for the address bar | |
speech-input.tsx |
Button and Spinner with the Web Speech API | |
sandbox.tsx, schema-display.tsx, snippet.tsx |
Trace, Tabs, Collapsible, Code Block and Input Group |
The audio pieces are the ones most chat apps need again, for voice replies. Detent's Voice note installs with the shadcn CLI like any other registry item:
npx shadcn add https://detentui.com/r/voicenote
import { VoiceNote } from '@/components/detent/components/voicenote/VoiceNote'
<VoiceNote words={words} duration={17} src="/replies/4821.mp3" />
It works without an audio file too: give it the word timings and it plays on a timer.
Starting a new project
For a chatbot, start from shadcn/ui. The shadcn/ui AI Elements patterns and its chatbot template are free, maintained by the shadcn/ui team and built on the AI SDK. This is the default choice now.
For a full chat runtime, look at assistant-ui. It handles threads, history, editing and branching for you, where AI Elements gives you components and leaves state to you.
For finished agent screens, look at a component library. Detent ships whole pieces with their motion and states worked out: a Diff review for code an agent wants to change (free), a Prompt box (free), and an Agent chat with tool approvals (Pro).
Comparing all of them? AI Elements alternatives puts six libraries side by side, with price, licence, AI SDK support and what each covers.
Sources
- shadcn/ui, Migrating from AI SDK Elements
- vercel/ai-elements README
- shadcn/ui, Elements without a replacement
All checked Dec 2, 2026.
Originally published on Detent UI.
Comments
Join the discussionNo comments yet. Be the first to comment.

