@a5it/sync-ui

中文文档
0.1.90发布于 2026/10/30ISCTypeScriptES Module零依赖近 30 天下载 1689

Shared UI components for A5 apps.

原始使用文档
文档目录6 节
  1. Install
  2. Usage
  3. Styles
  4. Theming
  5. Tree shaking
  6. Build

@a5it/sync-ui

This initial version exports data-table (the V2 table used in reseller/new-table) and keeps future extension points for sidebar, hooks, providers, utils, and types.

Install

pnpm add @a5it/sync-ui

Usage

import {
  DataTableProvider,
  DataTableTable,
  DataTableSearch,
  DataTableSortBy,
  DataTablePagination,
} from "@a5it/sync-ui";

Styles

Import once in your app's root globals/index.css:

import "@a5it/sync-ui/styles.css";

Theming

Set your app theme once and SyncUI will inherit it automatically using shadcn conventions.

Tree shaking

  • ESM output only (dist/*.js), no CommonJS wrapper.
  • Subpath exports (./data-table, ./hooks, ./providers, etc.).
  • CSS is the only declared side effect.

Build

pnpm build

版本与发布记录

@a5it/sync-ui 共发布 85 个版本,首次发布于 2026/02/12;过去 12 个月发布了 85 个版本。

版本发布日期距今
0.1.90latest2026/10/3010 天前
0.1.882026/10/081 个月前
0.1.872026/10/081 个月前
0.1.862026/10/071 个月前
0.1.852026/09/231 个月前
0.1.842026/09/221 个月前

关于 @a5it/sync-ui 的常见问题

@a5it/sync-ui 是什么?

Shared UI components for A5 apps.

如何安装 @a5it/sync-ui?

在项目目录运行 npm install @a5it/sync-ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:clsx(^2.1.1)、cmdk(^1.1.1)、next(>=13.0.0)、nuqs(^2.7.2)、react(>=19.0.0)、sonner(^2.0.7)、date-fns(^4.4.0)、react-dom(>=19.0.0)、lucide-react(^0.477.0)、flatlist-react(^1.5.14)、react-mentions(^4.4.10)、tailwind-merge(^3.3.1)、react-hook-form(^7.0.0)、react-day-picker(^8.10.1)、country-state-city(^3.2.1)、react-number-format(^5.4.5)、@radix-ui/react-slot(^1.2.3)、@radix-ui/react-tabs(^1.1.13)、@tanstack/react-table(^8.21.3)、@radix-ui/react-dialog(^1.1.15)、@radix-ui/react-select(^2.2.6)、@radix-ui/react-switch(^1.2.6)、@radix-ui/react-popover(^1.1.15)、@radix-ui/react-tooltip(^1.2.7)、@radix-ui/react-checkbox(^1.3.3)、class-variance-authority(^0.7.1)、react-phone-number-input(^3.4.17)、@radix-ui/react-accordion(^1.2.3)、@radix-ui/react-separator(^1.1.7)、@radix-ui/react-radio-group(^1.3.8)、@radix-ui/react-scroll-area(^1.2.10)、@radix-ui/react-alert-dialog(^1.1.15)、@radix-ui/react-dropdown-menu(^2.1.16)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@a5it/sync-ui 支持 TypeScript 吗?

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

@a5it/sync-ui 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@a5it/sync-ui 可以商用吗?

@a5it/sync-ui 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@a5it/sync-ui 的下载量有多少?

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

@a5it/sync-ui 还在维护吗?

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