mcpField
A
Arc UI

Arc UI

远程服务
uiarc.dev开发工具1.0k今天更新

关于 Arc UI

Arc UI 是面向 React 开发者的组件与区块库,提供内置动效的可编辑源码,适用于 Next.js 和 Vite 项目。组件通过 shadcn CLI 安装或手动复制,并使用 CSS 模块和设计令牌。

主要功能

  1. 01提供 React 组件与页面区块
  2. 02内置动效及减少动效路径
  3. 03支持键盘操作
  4. 04通过 shadcn CLI 安装或手动复制
  5. 05使用 CSS 模块与设计令牌
  6. 06支持深色主题与强调色配置

适用场景

  1. 01为 Next.js 项目添加界面组件
  2. 02为 Vite 项目搭建交互界面
  3. 03为表单和数据视图添加动效
  4. 04调整组件主题和动效令牌

MCP 相关

README 提及 AI and MCP,但未说明 MCP 功能或接口。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://uiarc.dev/api/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

全部服务地址
Streamable HTTPhttps://uiarc.dev/api/mcp需要授权

工具

详细介绍

Arc:内置动效的 React 组件和模块。免费开源,可通过 shadcn 安装。

许可证:MIT shadcn 注册表:@uiarc CI 119 个组件 22 个模块 React 19

文档  ·  组件  ·  安装  ·  AI 和 MCP  ·  Pro

Arc 是一个内置动效的 React 组件和模块库。每个项目都是归你所有的纯源代码:使用一小组设计令牌的 CSS 模块、用于动画的 Motion、键盘支持,以及针对每个动画的减少动效方案。使用 shadcn CLI 安装任何内容,也可以手动复制文件。它适用于 Next.js 和 Vite,可搭配或不搭配 Tailwind 使用。本仓库包含免费开源部分:119 个组件和 22 个模块,以及它们共用的设计和动效令牌。所有内容都可在 uiarc.dev 上实时预览。

展示

这里精选了一些作品,均来自 uiarc.dev 的实时录制。标有 Pro 的项目属于 Arc Pro,不包含在本仓库中;其他所有项目都可以在这里免费安装。

封面流:可抛掷的照片深度轨道,搭配柔和的落地阴影和静谧的倒影。
封面流 Pro
可抛掷的照片深度轨道,搭配柔和的落地阴影和静谧的倒影。
环形图:弧线在不同数据集之间变形,总数滚动至中心。
环形图
弧线在不同数据集之间变形,总数滚动至中心。
计费切换:月付和年付价格相互滚动切换,并显示节省金额。
计费切换
月付和年付价格相互滚动切换,并显示节省金额。
轨道徽标:集成服务围绕你的产品标识运行。可按类别筛选。
轨道徽标 Pro
集成服务围绕你的产品标识运行。可按类别筛选。
钱包卡片堆:展开一叠卡片,抽出一张即可查看其活动记录。
钱包卡片堆 Pro
展开一叠卡片,抽出一张即可查看其活动记录。
折线图:切换时间范围,折线便会根据上一周期重新绘制。
折线图
切换时间范围,折线便会根据上一周期重新绘制。
数字输入框:带边界的步进控件,达到上限时会给出提示。
数字输入框
带边界的步进控件,达到上限时会给出提示。
活动圆环:每日目标进度扫过、计数递增,并在超过 100% 后再描绘一圈。
活动圆环 Pro
每日目标进度扫过、计数递增,并在超过 100% 后再描绘一圈。
## 目录

安装

要求
  • React 19 和 TypeScript。源码可在 strict、noUncheckedIndexedAccess 和 verbatimModuleSyntax 模式下编译,并且需要 lib ES2023 或更高版本(少数项目使用了 findLast)
  • Next.js(App Router)或 Vite
  • 动画需要 motion。部分项目还会用到 lucide-react 或 Radix UI 原语;CLI 会安装项目所需的依赖。
  • @/* 导入别名(Next.js 和 shadcn 默认会配置)

不需要 Tailwind。Arc 样式使用读取 CSS 变量的 CSS 模块。

使用 shadcn CLI

在 components.json 中注册一次 @uiarc 命名空间:

{
  "registries": {
    "@uiarc": "https://uiarc.dev/r/{name}.json"
  }
}

然后按名称添加项目。区块中的组件等本地依赖也会自动一并安装:

npx shadcn@latest add @uiarc/button @uiarc/dialog

每个项目也可以通过完整 URL 安装,无需修改 components.json:

npx shadcn@latest add https://uiarc.dev/r/button.json

每个应用只需安装一次设计令牌:运行 npx shadcn@latest add @uiarc/arc-foundation,然后在应用根目录导入。组件只会引入 motion 预设(arc-motion-tokens),不会重新安装 foundation.css,因此也可以将这些令牌放在自己的主题包中。

// app/layout.tsx (Next.js) or src/main.tsx (Vite)
import "@/components/arc/foundation.css";
创建新项目

Next.js

npx create-next-app@latest my-app
cd my-app
npx shadcn@latest init

接受默认的 @/* 导入别名。

Vite

npm create vite@latest my-app -- --template react-ts
cd my-app
npx shadcn@latest init

按照 shadcn 的要求,在 tsconfig.json 和 vite.config.ts 中将 @/* 映射到 src:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": { "@/*": ["./src/*"] }
  }
}
import path from "node:path";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [react()],
  resolve: { alias: { "@": path.resolve(__dirname, "./src") } },
});
复制并粘贴
  1. 安装共享包:npm install motion lucide-react。
  2. 将此仓库中的 registry/foundation.css、registry/motion-tokens.ts 和 lib/motion-tokens.ts 复制到 @/ 根目录下相同的路径,并在根目录导入一次 CSS。
  3. 从 registry/components/<id>/ 或 registry/blocks/<id>/ 复制项目文件夹,并保留路径。复制的文件会保留此仓库的结构,并通过 @/ 相互导入;上方的 CLI 安装命令会替你重写这些路径。它的 public/r/<id>.json 文件列出了所需的每个文件和 npm 包。

uiarc.dev 上的每个页面也都有一个 Manual 选项卡,其中列出了确切的文件。

用法

CLI 会将每个文件放在 components.json 中 components 别名对应的 arc/ 文件夹下,例如 components/arc/button/button.tsx;如果是 src/ 项目或 monorepo 包,则放在 src/components/arc/…。Arc 文件通过相对路径相互导入,因此任何别名配置都适用;如果想放到其他位置,可以整体移动 arc/ 文件夹。像使用任何本地组件一样使用它们:

import { Button } from "@/components/arc/button/button";

export default function Page() {
  return <Button>Save changes</Button>;
}

代码归你所有:可以编辑、重命名和移动。无需同步运行时包。

主题

组件读取语义化令牌,而不是原始颜色。在 foundation.css 中更改令牌(通过 CLI 安装后为 components/arc/foundation.css),所有组件都会在两种主题下同步更新。

令牌用途
--background所有内容后方的页面背景
--surface、--surface-raised、--surface-muted卡片和输入框、浮动层、低调的填充色
--foreground、--text-secondary、--text-muted主要文本、辅助文本和提示文本
--border、--border-subtle、--border-strong分隔线和边缘
--accent、--accent-strong、--accent-subtle选中状态、进度和辅助信息
--success、--warning、--danger状态,始终搭配标签使用
--radius-control、--radius-panel、--radius-surface控件、菜单、卡片
--font-display、--font-body标题使用 Geist,其余内容使用 Inter
  • 深色模式: 在 <html> 上设置 data-theme="dark"。深色模式的值经过单独调校,而非简单反转。
  • 强调色: 在 <html> 上将 data-accent 设置为 neutral、violet、blue、green、amber、orange、coral 或 rose。
  • 动效: 弹簧和持续时间配置在 lib/motion-tokens.ts 中(通过 CLI 安装后为 components/arc/lib/motion-tokens.ts)。所有动画都会遵循 prefers-reduced-motion。

更多内容请参阅主题文档和动效文档。

组件

119 个免费组件,分组方式与网站一致。点击名称即可查看实时预览和文档。

操作 (20) · 输入 (37) · 折叠 (14) · 反馈 (11) · 数据 (32) · 文本 (4) · 特殊 (1)

操作

按钮

组件描述安装
按钮清晰、响应迅速的操作按钮,带有低调的次要状态。npx shadcn@latest add @uiarc/button
操作按钮用于频繁工具栏操作的紧凑按钮。npx shadcn@latest add @uiarc/action-button
分体按钮主要操作按钮,附带一组选项相近的菜单。npx shadcn@latest add @uiarc/split-button
按钮组将相关操作合并到同一表面,并以纤细分隔线划分:悬停高亮会在各个区段间滑动,按下的按钮会原地响应,附加菜单还可以收起整行。npx shadcn@latest add @uiarc/button-group
浮动按钮组在低调的托盘中排列独立的柔和按钮;移动时,共享高亮会在按钮间变形移动,按下后则停留在原位。npx shadcn@latest add @uiarc/floating-button-group
展开按钮组紧凑按钮组中的图标按钮:指向或聚焦的按钮会展开并显示标签,同时相邻按钮向两侧滑开;操作会原地确认。npx shadcn@latest add @uiarc/expanding-button-group
复制按钮复制值后立即显示确认信息。npx shadcn@latest add @uiarc/copy-button
操作切换切换操作标签,同时保留原有位置和意图。npx shadcn@latest add @uiarc/action-swap
图标变形可在不同状态间变形的图标:菜单变为关闭、播放变为暂停、复制变为勾选等。npx shadcn@latest add @uiarc/icon-morph
确认变形破坏性操作按钮会变形为行内确认、旋转指示器和带撤销选项的结果。npx shadcn@latest add @uiarc/confirm-morph

手势

组件描述安装
按住确认按住而非轻触,以确认破坏性操作。npx shadcn@latest add @uiarc/hold-to-confirm
滑动操作滑动以显示行操作,也可以从菜单中访问相同的操作。npx shadcn@latest add @uiarc/swipe-actions
回应一键回应帖子,计数会滚动变化。npx shadcn@latest add @uiarc/reactions

菜单

组件描述安装
下拉菜单锚定在触发器上的精简操作列表。npx shadcn@latest add @uiarc/dropdown-menu
上下文菜单紧邻所选对象的辅助操作。npx shadcn@latest add @uiarc/context-menu
用户菜单头像后提供账户、设置、主题和退出登录选项。在手机上以底部抽屉形式打开。npx shadcn@latest add @uiarc/user-menu

主题

组件描述安装
主题切换器在浅色和深色外观之间切换的四种流畅方式。npx shadcn@latest add @uiarc/theme-switch
日食下一种外观如日食般横穿页面。npx shadcn@latest add @uiarc/theme-switch-eclipse
分割下一种外观从细窄的中心接缝处展开。npx shadcn@latest add @uiarc/theme-switch-split
升起下一种外观逐渐升起并就位。npx shadcn@latest add @uiarc/theme-switch-rise
输入

文本字段

组件描述安装
输入框单行字段,标签清晰,状态实用。npx shadcn@latest add @uiarc/input
多行文本框用于填写备注、描述和较长文本的多行字段。npx shadcn@latest add @uiarc/textarea
密码字段输入敏感文本,并提供可见的显示控制。npx shadcn@latest add @uiarc/password-field
密码强度输入新密码时显示其强度。npx shadcn@latest add @uiarc/password-strength
搜索框易于识别的搜索入口,提供清晰的操作提示。npx shadcn@latest add @uiarc/search-field
展开式搜索图标变形为搜索框,并在下方显示结果。npx shadcn@latest add @uiarc/expanding-search
行内编辑就地重命名:文本变为字段,位置保持不变。npx shadcn@latest add @uiarc/inline-edit

特殊输入

组件描述安装
数字输入框输入有范围限制的数字,并通过清晰的控件递增或递减。npx shadcn@latest add @uiarc/number-field
金额输入框货币输入框,支持实时分组、宽度稳定、数字滚动显示,并以最小货币单位输出。npx shadcn@latest add @uiarc/money-input
电话输入框电话输入框,支持国家/地区选择器、输入时格式化,并输出 E.164 格式。npx shadcn@latest add @uiarc/phone-input
拖动输入框Figma 风格的数字输入框:拖动标签即可调整数值,也可输入数值、单位和算式。npx shadcn@latest add @uiarc/scrub-input
标签输入框将简短文本值转换为可移除的标签。npx shadcn@latest add @uiarc/tag-input
提及输入框支持 @人和 #频道提及的文本区域;提及内容作为单个词元处理,光标处会显示建议。npx shadcn@latest add @uiarc/mention-input
快捷键录制器将按键组合录制为按键帽,支持冲突警告、Kbd 和可搜索的速查表。npx shadcn@latest add @uiarc/shortcut-recorder

选择器

组件描述安装
选择器紧凑的选项输入框,配有便于键盘操作的菜单。npx shadcn@latest add @uiarc/select
组合框无需离开输入框,即可搜索并从列表中选择。npx shadcn@latest add @uiarc/combobox
多选框选择多个值,同时保持输入框清晰易读。npx shadcn@latest add @uiarc/multi-select
形变选择器触发器会展开为列表的选择器,带有滑动高亮和输入即搜功能。npx shadcn@latest add @uiarc/morph-select
标签组使用选取时会变形的标签筛选少量分类。npx shadcn@latest add @uiarc/chip-group

切换控件

组件描述安装
单选卡片可选项卡片,带有滑动选中环、价格和描述插槽,并支持单选框键盘操作。npx shadcn@latest add @uiarc/radio-cards
账单周期切换月付和年付切换,带有节省金额徽标,价格会滚动更新为新金额。npx shadcn@latest add @uiarc/billing-toggle
复选框状态明确易读的二元选择控件。npx shadcn@latest add @uiarc/checkbox
单选组从一组可见选项中选择一个。npx shadcn@latest add @uiarc/radio-group
开关用于立即生效设置的触感式切换控件。npx shadcn@latest add @uiarc/switch
分段控件在少量相关视图之间切换。npx shadcn@latest add @uiarc/segmented-control
评分简单易用且无障碍的数字评价方式。npx shadcn@latest add @uiarc/rating

滑块

组件描述安装
滑块在轨道上滑动手指,选择一个值或范围。npx shadcn@latest add @uiarc/slider
弹性滑块滑块越过两端时会像橡胶一样伸展,数值标签随之摆动,滑块拇指还会卡入定位点。npx shadcn@latest add @uiarc/elastic-slider
范围直方图滑块在实时数据直方图上选择价格范围,点亮范围内的柱形,并在柱形边缘处吸附。npx shadcn@latest add @uiarc/range-histogram-slider

选择器

组件描述安装
日历以清晰紧凑的月份视图浏览日期。npx shadcn@latest add @uiarc/calendar
日期选择器选择日期,同时保留当前上下文。npx shadcn@latest add @uiarc/date-picker
日期范围选择器范围选择器会从触发器展开为两个月视图,并提供预设选项和可伸展的范围高亮。npx shadcn@latest add @uiarc/date-range-picker
时间选择器选择时间,并提供合理的键盘操作体验。npx shadcn@latest add @uiarc/time-picker
颜色选择器色板可展开为选择器,支持格式切换、吸管工具、保存的色板和对比度读数。npx shadcn@latest add @uiarc/color-picker

编辑器

组件描述安装
富文本编辑器轻量级编辑器,支持 Markdown 快捷操作、浮动工具栏、斜杠菜单,以及 HTML 和 Markdown 输出。npx shadcn@latest add @uiarc/rich-text-editor
签名板流畅的笔迹会随速度加快而变细,并支持撤销、回放以及导出为 PNG 或 SVG。npx shadcn@latest add @uiarc/signature-pad
文件拖放区提供宽裕的投放区域,可拖放一个或多个文件。npx shadcn@latest add @uiarc/file-dropzone
披露

导航

组件说明安装
选项卡在同一上下文中的相关内容之间切换。npx shadcn@latest add @uiarc/tabs
面包屑显示页面在层级结构中的位置。npx shadcn@latest add @uiarc/breadcrumb
分页在内容较多的集合中浏览,并清楚显示范围。npx shadcn@latest add @uiarc/pagination

展开

组件说明安装
滚动区域原生滚动容器,带有纤细的叠加滚动条和边缘渐隐效果,仅在内容溢出时显示。npx shadcn@latest add @uiarc/scroll-area
手风琴在原处逐步显示辅助信息。npx shadcn@latest add @uiarc/accordion
可展开卡片根据需要为内容密集的卡片提供更多空间。npx shadcn@latest add @uiarc/expandable-card
可调整大小的面板拖动面板之间的分隔线,在各面板间调整空间。npx shadcn@latest add @uiarc/resizable-panels
可展开文本长文本默认截断为几行,并带有柔和的渐隐效果;溢出时才显示「查看更多」,点击后平滑展开,点击「收起」则关闭。npx shadcn@latest add @uiarc/expandable-text

叠加层

组件说明安装
对话框用于处理需要关注的重要决策的专注界面。npx shadcn@latest add @uiarc/dialog
抽屉用于专注工作的临时侧边界面。npx shadcn@latest add @uiarc/drawer
底部面板可停留在预览高度或全屏高度,并跟随手指操作的面板。npx shadcn@latest add @uiarc/bottom-sheet
弹出层用于显示上下文信息的小型锚定界面。npx shadcn@latest add @uiarc/popover
悬停卡片悬停或聚焦时预览人员或链接,无需离开当前页面。npx shadcn@latest add @uiarc/hover-card
工具提示为不熟悉的控件提供简短的辅助说明。npx shadcn@latest add @uiarc/tooltip
反馈

消息

组件描述安装
Alert持续显示的消息,帮助用户恢复操作或继续进行。npx shadcn@latest add @uiarc/alert
Toast对已完成的后台操作进行简短确认。npx shadcn@latest add @uiarc/toast
Toast stack将简短结果堆叠在边缘,直到用户主动查看。npx shadcn@latest add @uiarc/toast-stack
Announcement bar顶部横幅,可轮播消息、倒计时,并在关闭时平滑收起。npx shadcn@latest add @uiarc/announcement-bar
Cookie consent同意提示栏可展开为偏好设置,并收起为重新打开按钮。npx shadcn@latest add @uiarc/cookie-consent

进度

组件描述安装
Progress显示已知任务的完成进度。npx shadcn@latest add @uiarc/progress
Skeleton内容加载期间预留空间。npx shadcn@latest add @uiarc/skeleton
Stepper显示用户在多步骤流程中的进度以及已完成的步骤。npx shadcn@latest add @uiarc/stepper
Countdown带滚动数字的上线倒计时,在归零时变为实时状态。npx shadcn@latest add @uiarc/countdown
Usage meter显示额度的使用情况以及距离上限还有多远。npx shadcn@latest add @uiarc/usage-meter
Onboarding checklist一次引导一个步骤,帮助新工作区完成设置。npx shadcn@latest add @uiarc/onboarding-checklist
数据

头像

组件描述安装
Avatar用于标识人员和账户的紧凑标记。npx shadcn@latest add @uiarc/avatar
Avatar group在有限空间内展示团队或贡献者。npx shadcn@latest add @uiarc/avatar-group
Badge用于状态、类别或元数据的小标签。npx shadcn@latest add @uiarc/badge

卡片

组件描述安装
Card一组相关内容和操作的容器。npx shadcn@latest add @uiarc/card
Metric card为需要上下文的数字提供紧凑摘要。npx shadcn@latest add @uiarc/metric-card
Empty state暂无内容可显示时提供实用的下一步操作。npx shadcn@latest add @uiarc/empty-state

图表

组件描述安装
折线图多系列折线图,带有滑动十字线、图例开关,以及可在不同范围之间变形的路径。npx shadcn@latest add @uiarc/line-chart
柱状图对比多天的一项指标,并可拖动任意柱形查看其数值。npx shadcn@latest add @uiarc/bar-chart
环形图圆弧可在不同数据集之间变形,当前值滚动显示在中心。npx shadcn@latest add @uiarc/donut-chart
河流图以波动基线为基础的分层河流图,可在不同范围之间变形;还可单独查看某一层并逐周读取数据。npx shadcn@latest add @uiarc/streamgraph
画刷图带有概览条的密集时间序列图:拖动窗口进行缩放,通过控制柄调整窗口大小,并直接查看事件。npx shadcn@latest add @uiarc/brush-chart
华夫饼图一个十乘十的单元格图表,每个单元格代表百分之一;数据变化时,单元格会飞向新的分组。npx shadcn@latest add @uiarc/waffle-chart
斜率图在两个坐标轴上呈现前后对比:线条逐渐绘出,排名变化显示在各数值旁;切换数据集时,每条线都会滑向新的斜率。npx shadcn@latest add @uiarc/slope-chart
迷你折线图在数值旁展示紧凑的趋势图。npx shadcn@latest add @uiarc/sparkline
仪表图将数值与已知范围进行对比。npx shadcn@latest add @uiarc/gauge
活动热力图一览全年的活动情况,每天对应一个方格。npx shadcn@latest add @uiarc/activity-heatmap
动态计数器让不断变化的总数清晰呈现其变化过程。npx shadcn@latest add @uiarc/animated-counter
山脊图重叠分布图,每个分组对应一条山脊:悬停可抬起山脊并查看其四分位数;切换数据集时,每条曲线都会变形。npx shadcn@latest add @uiarc/ridgeline
树图方形树图:点击即可深入查看,图块会扩展以填满视图;提供返回面包屑导航,且每个图块都会随指标变化而变形。npx shadcn@latest add @uiarc/treemap

表格

组件描述安装
可排序数据表格使用可排序的列对结构化记录进行比较。npx shadcn@latest add @uiarc/sortable-data-table
树形表格支持嵌套行、三态选择、保留层级结构的排序,以及延迟加载子项的表格。npx shadcn@latest add @uiarc/tree-table
树形视图浏览嵌套文件夹和结构化内容。npx shadcn@latest add @uiarc/tree-view
可重新排序列表通过直接拖放来整理项目。npx shadcn@latest add @uiarc/reorderable-list
筛选工具栏将集合筛选器放在手边,方便重置。npx shadcn@latest add @uiarc/filter-toolbar
代码块以清晰易读的层次结构呈现代码,并提供复制功能。npx shadcn@latest add @uiarc/code-block
JSON 查看器可折叠的 JSON 树,支持搜索、对长数组分页,以及复制值或路径。npx shadcn@latest add @uiarc/json-viewer

活动

组件描述安装
时间线按日期分组,按时间倒序查看发生的事情。npx shadcn@latest add @uiarc/timeline
评论串支持回复、表情回应、提及、行内编辑和解决状态的串联评论。npx shadcn@latest add @uiarc/comment-thread
聊天串支持消息分组、表情回应、已读回执、输入状态,以及带附件的输入框的聊天串。npx shadcn@latest add @uiarc/chat-thread

媒体

组件描述安装
图片对比拖动分隔线,在两张图片之间查看变化。npx shadcn@latest add @uiarc/image-compare
轮播通过拖动、滑动或点击箭头浏览一行幻灯片。npx shadcn@latest add @uiarc/carousel
卡片堆叠一次查看一张卡片,并可将卡片甩出或撤销操作。npx shadcn@latest add @uiarc/card-stack
文本

文本效果

组件描述安装
文本显现以克制的动效展示一小段内容。npx shadcn@latest add @uiarc/text-reveal
进入视野的标题随着滚动进入视野,显示章节标题。npx shadcn@latest add @uiarc/in-view-title
文本变形逐字将标签变换为下一个状态。npx shadcn@latest add @uiarc/text-morph
文本微光以柔和的光效显示正在进行的工作。npx shadcn@latest add @uiarc/text-shimmer
特殊

文字

组件描述安装
滚轮文本文本和数字像老虎机滚轮一样错开转动,变为新值。npx shadcn@latest add @uiarc/slot-text

区块

22 个免费区块:使用 Arc 组件构建的完整版块和屏幕。

应用外壳
区块描述安装
页面页眉项目页面页眉会随滚动折叠为紧凑栏,标签页中的计数也会滚动变化。npx shadcn@latest add @uiarc/page-header
命令面板完整的键盘驱动操作界面,包含搜索、分组结果和快捷键。npx shadcn@latest add @uiarc/command-palette
通知中心集中查看更新,支持已读状态、信息分组和动态展开。npx shadcn@latest add @uiarc/notification-center
空状态一个插图中包含四种空状态,切换标签页时,图形会在不同场景之间变形。npx shadcn@latest add @uiarc/empty-states
身份验证
区块描述安装
注册表单包含字段验证、密码强度提示和明确完成状态的账号创建流程。npx shadcn@latest add @uiarc/signup-form
登录登录卡片可从邮箱输入切换为输入六位数验证码以登录账号。npx shadcn@latest add @uiarc/sign-in
居中登录以通行密钥为先的登录卡片,置于简洁的环形背景上,可在邮箱和验证码输入界面间切换。npx shadcn@latest add @uiarc/login-centered
OTP 输入框支持粘贴和键盘导航的六位数验证码输入流程。npx shadcn@latest add @uiarc/otp-input
定价
区块描述安装
方案对比对比不同方案和计费周期之间的重要差异。npx shadcn@latest add @uiarc/plan-comparison
媒体
区块描述安装
文件上传完整的文件选择流程,包含限制条件、进度和错误反馈。npx shadcn@latest add @uiarc/file-upload
主视觉区
区块描述安装
主视觉区块三种全屏 SaaS 主视觉区:从底部边缘升起、置于缓缓流动的网格背景上的实时仪表板;逐节点路由示例事件的工作流图;以及置于网格渐变之上的编辑风格字体。npx shadcn@latest add @uiarc/hero-section
功能
区块描述安装
对比表展示我方与竞品对比的表格,带有粘性表头、高亮列和纵向堆叠的手机视图。npx shadcn@latest add @uiarc/comparison-table
社会认同
区块描述安装
Logo 滚动展示一行简洁的品牌标识持续滚动,并配有暂停控件。npx shadcn@latest add @uiarc/logo-marquee
数据统计栏数字标题进入视野时会递增,每个数字都配有用于佐证的小型可视化元素,并在悬停时显示背景说明;可选择纯展示或搭配细线网格。npx shadcn@latest add @uiarc/stats-band
内容
区块描述安装
更新日志可筛选、就地展开并按月滚动浏览的发布说明。npx shadcn@latest add @uiarc/changelog-feed
常见问题区块可采用手风琴、主题导航栏或突出显示匹配项的可搜索列表形式呈现常见问题。npx shadcn@latest add @uiarc/faq-section
联系区块经过验证的联系表单可切换为确认界面,还包括支持渠道和显示当地时间的办公室卡片。npx shadcn@latest add @uiarc/contact-section
博客网格博客索引,包含精选文章、分类筛选、文章卡片、分页和就地阅读器。npx shadcn@latest add @uiarc/blog-grid
页眉和页脚
模块描述安装
网站页眉粘性网站页眉,滚动时变为纯色,带有滑动的活动链接、大型菜单面板和移动端抽屉。npx shadcn@latest add @uiarc/site-header
网站页脚网站页脚,包含链接列和新闻通讯、简约布局,以及大型渐隐 Arc 标记。npx shadcn@latest add @uiarc/site-footer
行动号召区域行动号召区域,可作为居中的收尾部分、与可自动完成设置的卡片并排的分栏区域,或可关闭的横幅。npx shadcn@latest add @uiarc/cta-section
新闻通讯订阅以往期内容堆叠为背景的电子邮件订阅表单;订阅后,下一期会以收件人为地址,放到最前面。npx shadcn@latest add @uiarc/newsletter-signup

AI 工具

Arc 专为通过 AI 编码工具使用而构建。

  • MCP 服务: https://uiarc.dev/api/mcp(Streamable HTTP,免费内容无需密钥)。可通过 Claude Code、Cursor、VS Code 或 Codex 搜索、阅读文档并获取源代码。

    claude mcp add --transport http arc https://uiarc.dev/api/mcp
    
  • llms.txt: https://uiarc.dev/llms.txt 提供索引;llms-full.txt 在一个文件中包含所有内容。

  • Markdown 文档: 每个页面都有对应的 Markdown 版本,位于 /components/<id>/markdown。

各客户端的设置方法见 AI 和 MCP 文档。

故障排除

找不到模块 @/registry/...

Arc 文件通过 @/* 别名相互导入。请在 tsconfig.json 中将其映射到项目根目录(使用 Vite 时,还需在 vite.config.ts 中映射)。请参阅设置新项目。

组件没有样式或颜色

在根目录中导入一次 tokens:import "@/registry/foundation.css";。如果缺少此文件,请运行 npx shadcn@latest add @uiarc/arc-foundation。

CLI 提示 @uiarc 是未知注册表

将 registries 条目添加到 components.json(请参阅使用 shadcn CLI),或使用完整 URL 安装:npx shadcn@latest add https://uiarc.dev/r/<id>.json。

暗色模式无法切换

Arc 会根据 <html> 上的 data-theme 属性切换主题,而不是根据 dark 类。请在页面绘制前设置 data-theme="dark",以避免短暂显示浅色主题。

链接和图片:使用 next/link、next/image 或自定义组件

组件会渲染普通的 <a> 和 <img>,因此可用于 Vite、Remix、Astro 或纯 React。若要通过 Next.js 或自定义的 Link(例如支持区域设置的链接组件)处理路由,请在应用外层包装一次 ArcProvider。使用它的组件会一并安装。

"use client";
import Image from "next/image";
import Link from "next/link";
import { ArcProvider } from "@/components/arc/lib/arc-provider";

export function Providers({ children }: { children: React.ReactNode }) {
  return <ArcProvider link={Link} image={Image}>{children}</ArcProvider>;
}

link 接收 href 和锚点属性;image 接收 src、alt、width 和 height,或 fill、sizes 和 priority,这些都是 next/image 接收的相同属性。

有几个区块是 Next.js 页面示例,仍会直接导入 next/image 或 next/link:changelog-feed、site-header、newsletter-signup。在其他框架中,请将 Image 替换为 <img>(或使用 arc-provider 中的 ArcImage),并将 Link 替换为 <a>。

动画无法播放

Arc 会遵循操作系统的减少动态效果设置,并将动态效果替换为简单的淡入淡出。关闭此设置即可查看完整动画,并确保已安装 motion。

CLI 提示覆盖 foundation.css

只有 arc-foundation 会写入 foundation.css;组件和区块依赖的是 arc-motion-tokens。如果自定义 tokens 后再次运行 add @uiarc/arc-foundation,请选择否以保留文件,或将覆盖内容保存在单独的样式表中,并在其后加载该样式表。

发布流程

新的免费组件和区块会定期少量发布。每次发布都会同时更新此仓库、@uiarc 注册表和更新日志,因此此处的代码始终与 CLI 安装的内容一致。关注或为仓库加星,即可了解新内容。

仓库结构

registry/foundation.css      design tokens, light and dark themes
registry/motion-tokens.ts    motion presets
lib/motion-tokens.ts         motion presets, shared path
lib/                         small shared helpers
registry/components/<id>/    components
registry/blocks/<id>/        blocks
registry.json                shadcn registry index
public/r/<id>.json           prebuilt registry items, one per component or block

Arc Pro

Arc Pro 在此库基础上增加了 156 个组件和区块:包括上文的 Cover flow 等画廊、钱包和金融界面、更丰富的图表,以及完整的产品页面。它们遵循与此处所有内容相同的规则:由你掌控的纯源代码、支持两种主题、支持键盘操作,并提供减少动态效果的模式。

  • 每个 Pro 组件和区块的源代码,可通过个人令牌使用相同的 shadcn CLI 安装,也可通过 MCP 服务安装
  • 每次 Pro 发布的所有新内容,以及你已有组件和区块的修复与更新
  • 按年订阅,或一次付款获得终身使用权。请参阅定价

此仓库中的所有内容都保持免费,并采用 MIT 许可。

贡献

欢迎提交 Bug 报告、修复和组件创意。请先阅读 CONTRIBUTING.md,并遵守行为准则。如需报告安全问题,请参阅 SECURITY.md。

许可证

MIT © 2026 Elia Kuratli

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。