@a-type/ui

中文文档
6.1.63发布于 2026/11/07TypeScriptESM + CJS构建来源已验证近 30 天下载 2609
原始使用文档

@a-type/ui

My personal UI component library for building React applications.

Documentation

Browse the component docs and examples, or run pnpm storybook locally.

For coding agents, the docs are also published as JSON at manifests/components.json and manifests/docs.json. The package ships TanStack Intent skills for listing components, looking up their docs, and writing CSS with the Arbor theme. Run npx @tanstack/intent install in your project to point your agent at them.

Quick start

Install the package and its peer dependencies:

pnpm add @a-type/ui @arbor-css/core @arbor-css/postcss react react-dom

The library's CSS uses Arbor tokens and mixins, so your build must run the Arbor PostCSS plugin. Add it to postcss.config.ts:

import { ArborPlugin } from '@arbor-css/postcss';

export default { plugins: [ArborPlugin()] };

Then create arbor.config.ts in your project root to configure the theme:

import { presetAtype } from '@a-type/ui/arbor';

export default presetAtype({ color: { mainColor: 'tomato', ranges: {} } });

Import the stylesheet and wrap your app in the provider:

import '@a-type/ui/main.css';
import { Button, Provider } from '@a-type/ui';

function App() {
    return (
        <Provider manifestPath={false}>
            <Button>Get started</Button>
        </Provider>
    );
}

The provider includes icons, tooltips, toasts, and other shared behavior. Remove manifestPath={false} if you want its PWA install dialog to load /manifest.json.

版本与发布记录

@a-type/ui 共发布 539 个版本,首次发布于 2023/05/26;过去 12 个月发布了 232 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
6.1.63latest2026/11/07今天
6.1.622026/11/07今天
6.1.612026/11/017 天前
6.1.602026/11/017 天前
6.1.592026/11/017 天前
6.1.582026/11/017 天前

其他发布通道:beta → 4.1.0-beta.7。

关于 @a-type/ui 的常见问题

如何安装 @a-type/ui?

在项目目录运行 npm install @a-type/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19)、react-dom(^19)、@arbor-css/core(^0.0.149)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@a-type/ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@a-type/ui 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@a-type/ui 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@a-type/ui 可以商用吗?

@a-type/ui 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@a-type/ui 的下载量有多少?

根据 npm 官方下载统计,@a-type/ui 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,609 次,日均约 87 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@a-type/ui 还在维护吗?

最新版本 6.1.63 发布于 2026/11/07(今天);至今共发布 539 个版本,其中过去 12 个月发布了 232 个;首次发布于 2023/05/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。