mcpField
A
ai-elements

ai-elements

github.com/laguaguDesign & UI71178 installsUpdated 1d ago
Repository

About ai-elements

A skill for integrating AI Elements components into projects using the AI SDK. It guides component selection, version-aware setup, customization, and validation of real interaction states.

Key features

  1. 01Project-specific component setup
  2. 02AI SDK version guidance
  3. 03Generated source customization
  4. 04Chat state composition
  5. 05Rendered-flow verification

Use cases

  1. 01Adding chat UI to an application
  2. 02Implementing streaming and retry states
  3. 03Integrating attachments or approval flows

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/laguagu/claude-code-nextjs-skills --skill ai-elements

After installing, type/ai-elementsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
agent.md
artifact.md
attachments.md
audio-player.md
canvas.md
chain-of-thought.md
checkpoint.md
code-block.md
commit.md
confirmation.md
connection.md
context.md
controls.md
conversation.md
edge.md
environment-variables.md
file-tree.md
image.md
inline-citation.md
integration.md
jsx-preview.md
message.md
mic-selector.md
model-selector.md
node.md
open-in-chat.md
package-info.md
panel.md
persona.md
plan.md

Details

From the project README

AI Elements

Use AI Elements where its components fit the interaction. The generated source belongs to the project: inspect it for the actual API and customize it deliberately.

Project and documentation

Follow the project's package manager, aliases, shadcn configuration and AI SDK major. Read ai-sdk to resolve the installed version, then the appropriate ai-sdk-6 or ai-sdk-7 guidance. AI Elements and AI SDK versions can change independently.

Read generated components/ai-elements/<component>.tsx first, then the matching references/ file and its scripts/ examples. Use the AI Elements site for current documentation. Load only relevant references; verify bundled examples against installed source.

For installation, use the project's runner with ai-elements@latest add <component> or shadcn@latest add @ai-elements/<component>. Components land in components/ai-elements/ under the alias configured in components.json; that installed source is the offline API reference. Check installed components and review generated files before replacing local customization. Use shadcn for registry, preset and primitive-base details.

AI Elements targets the Radix base (upstream uses style new-york with radix-ui). On Base UI projects expect prop mismatches in prompt-input, attachments, inline-citation and plan (upstream #446, open 2026-10-11); adapt the installed copies.

Integration

Integration covers the UI/SDK boundary, v6 pitfalls and the context.tsx patch that AI SDK 7 needs. Keep stable message IDs and render supported message parts with the generated compound components. Keep model choice, tools, credentials and authorization on the server.

Compose the states the feature needs: streaming, completion, retry, cancellation, attachments, approval or sources. Avoid adding components merely because the library offers them. Preserve keyboard interaction, accessible labels and useful scroll behavior.

When rendering fails, inspect the owned component, theme imports, semantic tokens and actual configured aliases. Do not copy a default tsconfig or replace the project's theme to fix one import. For unstyled markdown, check the MessageResponse setup.

Verify the rendered flow with real message states and the project's checks; type correctness alone does not establish usable streaming or attachment behavior.

Comments

Markdown supported