AI SDK
AI Elements Is Being Deprecated: What to Do With the Code You Copied
Nothing you copied breaks. Here is what moved, what was not rebuilt, and what to use instead.
components/ai-elements
- message.tsxMessage
- prompt-input.tsxPrompt Input
- confirmation.tsxConfirmation
- audio-player.tsx Not rebuilt
- transcription.tsx Not rebuilt
- artifact.tsx Not rebuilt
Short answer: AI Elements from elements.ai-sdk.dev is deprecated at the end of November 2026 and replaced by AI Elements in shadcn/ui.1 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.2 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.1 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.1
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.3 If you depend on one, these are your options:
audio-player.tsx, transcription.tsx
Build it from an audio element with Button Group and Slider; a Button per transcript segment.
Or use Detent Voice note (free, MIT): waveform, speed, and a transcript that follows playback.
artifact.tsx, canvas.tsx and the React Flow files
Build it from Card, Button and Tooltip; React Flow for the canvas.
Or use Detent Agent canvas (Pro): a chat beside the artifact it edits.
mic-selector.tsx, voice-selector.tsx
Build it from Combobox.
web-preview.tsx
Build it from an iframe with Input Group for the address bar.
speech-input.tsx
Build it from Button and Spinner with the Web Speech API.
sandbox.tsx, schema-display.tsx, snippet.tsx
Build it from 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/voicenoteimport { 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, which is how the demo on its page runs.
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.1 This is the default choice now that the old library is deprecated.
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). They install with the shadcn CLI, so they sit beside shadcn/ui patterns without conflict. For approvals specifically, see Agents that ask first.
Comparing all of them? The AI Elements alternatives guide puts six libraries side by side, with price, licence, AI SDK support and what each covers.
If you want finished pieces instead
shadcn/ui covers most files, and for those its version is the one to use. Where you would rather install something with its motion and states already worked out, these are the Detent pieces that do the same job. Everything else on the list has no Detent counterpart.
- prompt-input.tsxPrompt boxFree, MIT
- model-selector.tsxModel & effortFree, MIT
- audio-player.tsx, transcription.tsxVoice noteFree, MIT
- confirmation.tsxAgent chat, with tool approvalsPro
- artifact.tsx, canvas.tsxAgent canvasPro
- Not in AI ElementsDiff review, for code an agent wants to changeFree, MIT
Notes
- 1. shadcn/ui, Migrating from AI SDK Elements. Checked Dec 2, 2026. ↩
- 2. vercel/ai-elements README, and the banner on elements.ai-sdk.dev. Checked Dec 2, 2026. ↩
- 3. shadcn/ui, Elements without a replacement. Checked Dec 2, 2026. ↩