@jocoding-ax-partners/design-system

中文文档
5.1.0发布于 2026/11/01MITTypeScriptES Module零依赖构建来源已验证

CSS-only design system built on HeroUI v3.

原始使用文档
文档目录9 节
  1. Install
  2. Setup
  3. What this package adds
  4. data-* attributes
  5. ListBox selection
  6. Tailwind utilities
  7. Component documentation
  8. Using with a coding agent
  9. License

@jocoding-ax-partners/design-system

CSS-only design system built on HeroUI v3.

This package exports no components. You import components from @heroui/react as usual; this package ships a single stylesheet that restyles them and registers a set of design tokens. There is no provider, no wrapper, and no JavaScript.

Install

npm install @jocoding-ax-partners/design-system @heroui/react@^3 @heroui/styles@^3 tailwindcss@^4

Setup

Add one import to your Tailwind CSS entry file:

@import "tailwindcss";
@import "@jocoding-ax-partners/design-system/styles";

That is the whole setup. @jocoding-ax-partners/design-system/styles imports @heroui/styles itself, so you do not import it separately — but it stays a peer dependency and must be installed. Place the import after tailwindcss and after any stylesheet it should override.

Tailwind v4 for your framework is upstream setup — see the Tailwind installation guide. Same for HeroUI's own requirements and quick start.

import { Button } from "@heroui/react"; // ✅
import { Button } from "@jocoding-ax-partners/design-system"; // ❌ does not exist

What this package adds

data-* attributes

HeroUI's prop types cannot be extended, so the extra options ride on data attributes.

ComponentAttributeValues
Button (outline, ghost)data-coloraccent danger success warning info
ToggleButton (default, ghost)data-coloraccent danger success warning info
Chipdata-colorinfo
Checkbox.Controldata-sizemd
Checkbox.Controldata-rounded"true"
Radio.Controldata-sizemd
<Button variant="outline" data-color="danger">Delete</Button>

ListBox selection

Inside Select, ComboBox, Autocomplete and standalone ListBox, the item indicator is hidden and a selected item is marked by an accent background instead.

<ListBox.Item id="florida" textValue="Florida">
  Florida
  <ListBox.ItemIndicator /> {/* opts this item into the accent background */}
</ListBox.Item>

Rendering the indicator is what opts an item into that styling. An item without one keeps HeroUI's appearance, where selection is not marked at all.

Tailwind utilities

Registered on top of stock Tailwind and HeroUI:

  • Colors — accent-50…accent-950, gray-850, and an info family (info, info-soft, info-soft-foreground, …) that HeroUI does not ship
  • Radius — rounded-button-xs|sm|md|lg, rounded-input, rounded-list-box, rounded-toast, rounded-dialog, rounded-card, …
  • Spacing — h-button-sm|md|lg, size-input, gap-field, …
  • Typography — text-display-01…04, text-heading-01…05, text-body-01…03, text-caption-01|02
  • Variant — light:, the counterpart to HeroUI's dark:

Parts of HeroUI's own palette are also re-valued without adding a utility name — the gray scale is shifted to neutral oklch, and a number of semantic, surface and field roles are overridden. Keep using HeroUI's utility names for those.

Exact values live in the shipped stylesheet (node_modules/@jocoding-ax-partners/design-system/dist/styles/index.css). They are deliberately not duplicated here, because a copy drifts from the source.

Component documentation

This package does not document HeroUI's components — that is HeroUI's to maintain, and a copy here would go stale on every release. Use, in order:

  1. The HeroUI MCP server (@heroui/react-mcp) — setup
  2. v3.heroui.com/docs/react/components
  3. node_modules/@heroui/react/dist/components/<name>/<name>.d.ts — the installed version, which wins when the docs disagree with runtime behavior

Using with a coding agent

llms.txt ships inside the package and is the agent-facing reference for everything above. Point your agent at it once, e.g. in CLAUDE.md:

## @jocoding-ax-partners/design-system

This project uses @jocoding-ax-partners/design-system, a CSS-only design system on HeroUI v3.
Import all components from `@heroui/react`, never from `@jocoding-ax-partners/design-system`.
Read `node_modules/@jocoding-ax-partners/design-system/llms.txt` before writing UI code — it lists
the `data-*` extensions and design tokens this project adds on top of HeroUI.

License

MIT

版本与发布记录

@jocoding-ax-partners/design-system 共发布 6 个版本,首次发布于 2026/08/19;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.1.0latest2026/11/012 天前
4.2.02026/09/101 个月前
4.1.02026/09/091 个月前
4.0.02026/09/041 个月前
3.0.12026/08/202 个月前
3.0.02026/08/192 个月前

关于 @jocoding-ax-partners/design-system 的常见问题

@jocoding-ax-partners/design-system 是什么?

只基于css设计系统 HeroUI v3.

如何安装 @jocoding-ax-partners/design-system?

在项目目录运行 npm install @jocoding-ax-partners/design-system,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:tailwindcss(^4)、@heroui/react(^3.2.4)、@heroui/styles(^3.2.4)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@jocoding-ax-partners/design-system 支持 TypeScript 吗?

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

@jocoding-ax-partners/design-system 支持 ESM 还是 CommonJS?

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

@jocoding-ax-partners/design-system 可以商用吗?

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

@jocoding-ax-partners/design-system 还在维护吗?

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