The Working Approach
AI Elements guides an agent through adding purpose-built chat components to an existing Next.js application. It covers conversation views, message content, tool displays and prompt inputs. The components live inside your repository, so the interface can follow the product's own styling and interaction requirements.
The source connects these components to the AI SDK and shadcn/ui conventions. Its examples compose message primitives around text parts rather than treating an assistant response as a single opaque widget. This makes the skill useful when the model integration exists and the next task is giving users a coherent place to read and respond.
Expected Deliverables
- Selected component source files added to the project's configured components directory.
- A React conversation view composed from message and response primitives.
- Project-specific styling and an explanation of any integration issues still unresolved.
From Brief to Review
- 01Check the existing application
Inspect the package runner, Next.js setup, AI SDK dependencies and shadcn configuration. Confirm import aliases and global styles before adding components.
- 02Add the needed interface pieces
Use the project's package runner with the supported component installer. Select the pieces the conversation needs and inspect the files added to the repository.
- 03Connect and customize
Map each message's role to Message, nest MessageContent, and render text parts with MessageResponse as in the source example. Tool results require their own supported display rather than being assumed to render through that text-only example. Adjust local Tailwind classes and inspect the resulting conversation states.