Skip to content
unseen.uiby Stack Unseen
Get started

Migrate from AI Elements

The AI Elements site now says it is moving to shadcn/ui and that the project will be deprecated at the end of November 2026. If you are choosing what to move to, this page maps each AI Elements component to its Unseen UI counterpart and shows how the AI SDK connects.

What changes

AreaAI ElementsUnseen UI
DistributionSource copied into your project with a CLIOne npm package, @stackunseen/ui, updated by version
StylingTailwind CSS 4 and shadcn/uiScoped CSS files and theme tokens; no Tailwind needed
DataReads AI SDK message parts directlyControlled components; useAiSdkChat maps AI SDK state for you
ApprovalsConfirmation and tool approval statesApprovalCard binds the decision to the proposal version and stays pending until your server answers

Connect the AI SDK

Keep your useChat hook and server route. Replace the conversation, messages and prompt input with one component:

tsx
'use client';
import { useChat } from '@ai-sdk/react';
import { DefaultChatTransport, lastAssistantMessageIsCompleteWithApprovalResponses } from 'ai';
import { Chat, useAiSdkChat } from '@stackunseen/ui/chat';
import { renderMarkdownPart } from '@stackunseen/ui/markdown';
import '@stackunseen/ui/styles.css';
import '@stackunseen/ui/chat.css';

export function Assistant() {
  const chat = useChat({
    transport: new DefaultChatTransport({ api: '/api/chat' }),
    sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,
  });
  return <Chat {...useAiSdkChat(chat)} title="Assistant" renderTextPart={renderMarkdownPart} />;
}

Tools marked needsApproval on the server show an approval card under the tool; Approve and Reject call addToolApprovalResponse with the approval id. Your own tool views go in renderTool. The Chat on the AI SDK recipe runs this with a simulated chat and has the server route.

If you built your own layout from the pieces, use them directly: PromptInput, Message, ToolCall and ApprovalCard, with fromAiSdkChat from @stackunseen/ui-core/ai-sdk to map messages, tool calls, sources and approvals.

Component map

Each link opens the component page, which shows its import line and stylesheet.

Chatbot

AI ElementsUnseen UI
AttachmentsAttachment, FileDropzone
Chain of ThoughtChainOfThought
CheckpointCheckpoint
ConfirmationApprovalCard, shown inline by Chat
ContextContextBar, UsageMeter
ConversationChat, or ConversationViewport for paged history
Inline CitationCitation
MessageMessage
Model SelectorModelSelector
PlanPlan
Prompt InputPromptInput
QuestionClarificationRequest
QueueMessageQueue
ReasoningReasoning (public summaries only)
ShimmerLoadingIndicator; in-progress labels in ChainOfThought shimmer on their own
SourcesSources
SuggestionSuggestions
TaskChainOfThought with file chips as sources
ToolToolCall, ToolGroup

Code

AI ElementsUnseen UI
AgentAgentCard
ArtifactArtifactPanel, ArtifactPreview
Code BlockMarkdownCodeBlock, CodeTabs
CommitCommit
Environment VariablesEnvironmentVariables
File TreeFileExplorer
JSX PreviewNot offered: Unseen UI never renders model-written code. Use GeneratedUI for validated generated interfaces
Package InfoPackageInfo
SandboxNot yet; planned
Schema DisplaySchemaDisplay
SnippetSnippet
Stack TraceStackTrace
TerminalTerminalOutput
Test ResultsTestResults
Web PreviewWebPreview

Voice

AI ElementsUnseen UI
Audio PlayerAudioPlayer
Mic SelectorVoiceControl (microphone choice is part of it)
PersonaPersona
Speech InputVoiceControl
TranscriptionTranscription
Voice SelectorVoiceSelector

Workflow and utilities

AI ElementsUnseen UI
Canvas, Node, Edge, Connection, Controls, Panel, ToolbarWorkflowGraph as one component
ImageImage
Open In ChatShareMenu with a target per chat product

Styling

Remove the copied AI Elements files once their replacements are in place, then import @stackunseen/ui/styles.css once. Unseen UI's styles are scoped, so they sit beside Tailwind without conflict. Set colors, radius and density with AITheme or export a theme from the Theme Studio.

What to check after moving

  • Approval decisions now wait for your server's answer before reading as done. Make sure your route answers.
  • Reasoning parts from the AI SDK are not shown by useAiSdkChat; show public summaries with Reasoning if you want them.
  • Replies are plain text until you pass renderTextPart={renderMarkdownPart}.