@cjlapao/ui-kit-vue

中文文档
0.2.28发布于 2026/11/08TypeScriptESM + CJS构建来源已验证近 30 天下载 4345

Vue 3 port of @cjlapao/ui-kit. Same components, same Tailwind design system, same theme/utility layer — the framework-agnostic TypeScript (theme class maps, utils, most types) is shared with the React kit via re-exports from `../comm

原始使用文档
文档目录4 节
  1. Usage
  2. React → Vue API mapping
  3. Development
  4. Demo

@cjlapao/ui-kit-vue

Vue 3 port of @cjlapao/ui-kit. Same components, same Tailwind design system, same theme/utility layer — the framework-agnostic TypeScript (theme class maps, utils, most types) is shared with the React kit via re-exports from ../common, so both kits stay in sync by construction.

Usage

import { createApp } from "vue";
import { BottomSheetProvider, IconProvider, renderIcon } from "@cjlapao/ui-kit-vue";
import "@cjlapao/ui-kit-vue/styles.css";
<template>
  <IconProvider :render-icon="renderIcon">
    <BottomSheetProvider>
      <Button variant="solid" color="brand" leading-icon="Add">New item</Button>
    </BottomSheetProvider>
  </IconProvider>
</template>

React → Vue API mapping

ReactVue
className propclass attr (fallthrough, conflict-aware merge)
childrendefault slot
ReactNode props (title, actions, …)string prop or named slot of the same name
value + onChangev-model (modelValue / update:modelValue)
onClose / onToggle / …emits: @close, @toggle, …
hooks (useTheme, useStepper, …)composables with the same names returning Refs
IconProvider / BottomSheetProvider contextssame-named provider components (provide/inject)

See CONVENTIONS.md for the full conversion rules.

Development

npm install
npm run lint            # vue-tsc typecheck
npm run build           # vite lib build + d.ts
npm run generate:icons  # regenerate vue/src/icons from react/src/icons

Icons are generated — edit react/src/icons/components/*.tsx and re-run npm run generate:icons; never edit vue/src/icons by hand.

Demo

cd demo
npm install
npm run dev   # http://localhost:5175

The demo mirrors the React demo (../demo) page-for-page and consumes the kit source directly via a Vite alias.

版本与发布记录

@cjlapao/ui-kit-vue 共发布 26 个版本,首次发布于 2026/08/13;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.28latest2026/11/081 天前
0.2.272026/11/081 天前
0.2.262026/10/3110 天前
0.2.252026/10/2911 天前
0.2.242026/10/2911 天前
0.2.232026/10/2912 天前

关于 @cjlapao/ui-kit-vue 的常见问题

@cjlapao/ui-kit-vue 是什么?

Vue 3 port of @cjlapao/ui-kit. Same components, same Tailwind design system, same theme/utility layer — the framework-agnostic TypeScript (theme class maps, utils, most types) is shared with the React kit via re-exports from `../comm

如何安装 @cjlapao/ui-kit-vue?

在项目目录运行 npm install @cjlapao/ui-kit-vue,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cjlapao/ui-kit-vue 支持 TypeScript 吗?

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

@cjlapao/ui-kit-vue 支持 ESM 还是 CommonJS?

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

@cjlapao/ui-kit-vue 可以商用吗?

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

@cjlapao/ui-kit-vue 的下载量有多少?

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

@cjlapao/ui-kit-vue 还在维护吗?

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