‹ 返回总目录
工具 最近更新08-01

ai-elements

| 2026-08-01 收录

☆ 收藏
🛒 📚 AI提效实战指南 · 图解Skill🛒 📱 大流量手机卡 · 低月租📣 加入推广 · 佣金80-300/张 ›

🛍️ 更多精选好物 ›

📊 公开数据一览

📦 榜单安装量14.8K
⭐ GitHub Stars2,281(fork 263)
🗓️ 最近推送2026-08-01
🌱 项目创建2025-08-15
💻 语言 / LicenseTypeScript · NOASSERTION
🐛 开放Issue82

📝 工具简介

基于shadcn/ui的组件库和自定义注册表,加速AI原生应用开发。

📖 怎么用

先确认项目满足 Node.js 18+ 和 Next.js 要求。直接用推荐命令 `npx ai-elements@latest` 启动 CLI,或者用 shadcn 方式 `npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json`。想装单个组件,比如消息组件,运行 `npx ai-elements@latest add message`,对话组件用 `npx ai-elements@latest add conversation`,代码块用 `npx ai-elements@latest add code-block`。全装就用 shadcn 的 all.json 那个命令。

📋 迷你测评

基于shadcn/ui的组件库加自定义注册表,目标是加速AI原生应用开发。亮点是复用成熟组件体系,降低UI搭建成本。简介未提组件数量,适合已有shadcn/ui基础的项目。

📄 README 要点

这是基于shadcn/ui构建的React组件库,专门为AI原生应用设计,提供对话、消息、代码块、推理展示等预制组件。通过npx命令即可安装,但需要先满足几个条件:Node.js 18+、Next.js项目且已安装AI SDK、shadcn/ui已初始化、Tailwind CSS配置为CSS Variables模式。可以用CLI一次性安装所有组件,也可以按需添加。适合正在用Next.js开发AI应用、需要快速搭建聊天界面或展示AI推理过程的开发者,能省去大量UI开发时间。

查看英文原文
▲ AI Elements AI Elements is a component library built on top of shadcn/ui to help you build AI native applications faster. Overview AI Elements provides pre built, customizable React components specifically designed for AI applications, including conversations, messages, code blocks, reasoning displays, and more. The CLI makes it easy to add these components to your Next.js project. Installation You can use the AI Elements CLI directly with npx, or install it globally: [安装/使用命令见下方] Prerequisites Before using AI Elements, ensure your project meets these requirements: Node.js 18 or later Next.js project with AI SDK installed shadcn/ui initialized in your project ( npx shadcn@latest init ) Tailwind CSS configured (AI Elements supports CSS Variables mode only) Usage Install All Components Install all available AI Elements components at once: [安装/使用命令见下方] This command will: Set up shadcn/ui if not already configured Install all AI Elements components to your configured components directory Add necessary dependencies to your project Install Specific Components Install individual components using the add command: [安装/使用命令见下方] Examples: [安装/使用命令见下方] Alternative: Use with shadcn CLI You can also install components using the standard shadcn/ui CLI: [安装/使用命令见下方] Quick Start Example After installing components, you can use them in your React application: [安装/使用命令见下方] How It Works The AI Elements CLI: 1. Detects your package manager (npm, pnpm, yarn, or bun) automatically 2. Fetches component registry from https://elements.ai sdk.dev/api/registry/registry.json 3. Installs components using the shadcn/ui CLI under the hood 4. Adds dependencies and integrates with your existing shadcn/ui setup Components are installed to your configured shadcn/ui components directory (typically @/components/ai elements/ ) and become part of your codebase, allowing for full customization. Configuration AI Elements uses your existing shadcn/ui configuration. Components will be installed to the direc

💬 评论(0)

交流使用体验、避坑建议;违规内容将被删除

💬 意见反馈 / 联系客服

数据来源:skills.sh 榜单 + GitHub 公开数据,非人工实测,仅供参考