design-zystem

中文文档
1.0.465发布于 2026/11/03MITTypeScriptESM + CJS

A React design system of importable components

原始使用文档
文档目录15 节
  1. Tech stack
  2. Setup
  3. Scripts
  4. Storybook
  5. Structure
  6. Components
  7. Layout
  8. Typography & media
  9. Inputs
  10. Navigation
  11. Overlays
  12. Data
  13. Usage
  14. Publishing a new version
  15. Related projects

DesignSystem — design-zystem

Internal React component library shared across all DevCar web apps. Published as the design-zystem npm package.

Tech stack

CategoryTechnology
FrameworkReact 18
Stylingstyled-components 6
Buildtsup (CJS + ESM)
TypeScriptstrict, full .d.ts
Storybookv10 (Vite)
Testsvitest + jsdom + @testing-library/react

Setup

npm install
npx playwright install chromium   # required once for Storybook browser tests

Scripts

npm run build           # tsup → dist/ (CJS + ESM + .d.ts)
npm run storybook       # Storybook dev server on :6006
npm test                # behavioral unit tests (jsdom)
npm publish             # build + publish to npm

Storybook

npm run storybook launches a local dev server on :6006 with interactive docs and stories for all 35+ components. Each component has an auto-generated Docs page (props table + live playground) and multiple variant stories.

A static version can be generated with npm run build-storybook (outputs to storybook-static/) for deployment to a hosting service — not committed to the repo.

Structure

src/
  index.tsx             # barrel export
  Components/           # one folder per component
    <Name>/
      <Name>.tsx        # component + exported interface <Name>Props
      <Name>.css
      <Name>.stories.tsx
  data/
    colors.ts           # color palette
    globalMethods.ts    # shared helpers
__tests__/              # behavioral tests (vitest + @testing-library/react)
dist/                   # generated — do not edit

Components

Layout

Box · Col · Row · Grid · PageContainer · Divider · Bulk

Typography & media

Text · Bubble · Link · Icon · Image

Inputs

Button · Input · Checkbox · Radio · Switch · Select · MultiSelect · DatePicker

Navigation

Tabs · IconTabs · Stepper · Options

Overlays

Modal · NewModal · ModalConfirmation · Drawer · Popover · Tooltip

Data

List · ListItem · Table · CardSkeleton

Usage

import { Button, Input, Modal } from 'design-zystem'

Publishing a new version

  1. Bump version in package.json
  2. npm publish — triggers prepublishOnly → npm run build automatically
  3. Update design-zystem version in ClientOffice/package.json + DeliveryApp/package.json
ProjectDescription
ClientOfficeUses design-zystem
DeliveryAppUses design-zystem
CheckUses design-zystem

版本与发布记录

design-zystem 共发布 400 个版本,首次发布于 2024/08/12;过去 12 个月发布了 288 个版本。

版本发布日期距今
1.0.465latest2026/11/03今天
1.0.4642026/11/03今天
1.0.4632026/11/021 天前
1.0.4622026/11/021 天前
1.0.4612026/11/021 天前
1.0.4602026/11/021 天前

关于 design-zystem 的常见问题

design-zystem 是什么?

一个由可导入组件组成的React设计系统

如何安装 design-zystem?

在项目目录运行 npm install design-zystem,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.3.1)、react-dom(^18.3.1)、@types/react(^18.0.0)、@types/react-dom(^18.0.0)、styled-components(^6.1.12)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

design-zystem 支持 TypeScript 吗?

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

design-zystem 支持 ESM 还是 CommonJS?

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

design-zystem 可以商用吗?

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

design-zystem 还在维护吗?

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