@alexandregme/zljs

中文文档
2.1.2发布于 2026/11/04MITTypeScriptES Module构建来源已验证近 30 天下载 5991

Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).

原始使用文档
文档目录8 节
  1. Packages
  2. AI Roadmap
  3. Install
  4. Colors
  5. Updating
  6. Getting Started
  7. Tech Stack
  8. License

zljs — React Component Library

An open-source, TypeScript React component library for enterprise web apps (Next.js, Tailwind CSS v4), plus an AI agent that generates UI screens.

Packages

PackageDescriptionLinks
core/Component library — Button, DataGrid, Forms, Modal, and moreStorybook
agent/AI agent that generates UI screens (HTML + Tailwind CSS)README

AI Roadmap

Checked items exist today; unchecked items are planned, not implemented.

  • Conversational UI Generation (agent/)
  • AI-Powered Testing Automation (via zl-quality-kit)
  • Intelligent Component Recommendations
  • Predictive Quality Gates
  • Accessibility Validation via AI

Install

pnpm add @alexandregme/zljs

Peer dependencies: react@19, react-dom@19, next@>=16, @reduxjs/toolkit@2, react-redux@9.

Import the global styles once (e.g. in your root layout). It already tells Tailwind CSS v4 to scan the library classes, so no @source is needed:

/* app/globals.css */
@import "tailwindcss";
@import "@alexandregme/zljs/styles.css";
import { Button } from "@alexandregme/zljs";
import { RootLayout } from "@alexandregme/zljs/next";
import { FormProvider, FormInput } from "@alexandregme/zljs/rhf";

<Button onClick={handleClick}>Submit</Button>;

Colors

The components work with no setup, using the default colors. To use your own, redefine the values you want after importing the styles:

@import "tailwindcss";
@import "@alexandregme/zljs/styles.css";

@theme {
  --color-zl-primary: #2e7d32;
}

primary, success, danger, warning, info and muted each take one value (--color-zl-<color>), used for text and the focus outline. The others follow it, and you can redefine them too:

ValueUsed forDefault
--color-zl-<color>-strongLink hover and Tag text30% darker
--color-zl-<color>-bgButton backgroundThe color itself (warning: yellow-500)
--color-zl-<color>-hoverButton hoverThe background, 15% darker
--color-zl-<color>-onText on the backgroundWhite (warning: gray-900)

A Tag also takes the auxiliary colors orange, pink and purple, which have no meaning of their own: use them to tell categories apart. Each has only --color-zl-<color> and --color-zl-<color>-strong. The first, at 15%, is the Tag background, and the second is its text.

Only the defaults are checked for contrast. Check your own choice: 4.5:1 for text, on --color-zl-<color> against the page and on -on against -bg, and 3:1 for the focus outline. A value set on a nested element doesn't reach the values derived from it, so set them in @theme or :root.

Updating

See CHANGELOG.md, in the Keep a Changelog format. A change that needs action in an app has a Migration note, written so an agent can follow it. The file ships with the package, in node_modules/@alexandregme/zljs/CHANGELOG.md.

Getting Started

pnpm install
pnpm storybook    # Component library docs
pnpm agent:dev    # AI agent
pnpm test         # Run tests

Tech Stack

TypeScript, React 19, Tailwind CSS v4, Storybook 10, Radix UI, pnpm workspaces, GitHub Actions, Vercel

License

MIT

版本与发布记录

@alexandregme/zljs 共发布 42 个版本,首次发布于 2026/10/18;过去 12 个月发布了 42 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.1.2latest2026/11/042 天前
2.1.12026/11/033 天前
2.1.02026/11/033 天前
2.0.12026/11/033 天前
2.0.02026/11/033 天前
1.19.12026/11/033 天前

关于 @alexandregme/zljs 的常见问题

@alexandregme/zljs 是什么?

Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).

如何安装 @alexandregme/zljs?

在项目目录运行 npm install @alexandregme/zljs,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:next(>=16.0.0)、react(^19.0.0)、react-dom(^19.0.0)、react-redux(^9.0.0)、@reduxjs/toolkit(^2.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@alexandregme/zljs 支持 TypeScript 吗?

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

@alexandregme/zljs 支持 ESM 还是 CommonJS?

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

@alexandregme/zljs 可以商用吗?

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

@alexandregme/zljs 的下载量有多少?

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

@alexandregme/zljs 还在维护吗?

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