@edifice.io/react

中文文档
2.6.14发布于 2026/11/13AGPL-3.0TypeScriptES Module近 30 天下载 1.5万

Edifice React Library

原始使用文档
文档目录11 节
  1. Getting Started
  2. Build
  3. Lint
  4. Prettier
  5. Structure
  6. Component Folder
  7. Component Guideline
  8. Interface description
  9. Index file inside src folder
  10. Adding Icons
  11. Dev

Edifice React Components

npm bundlephobia

Getting Started

We follow WAI ARIA rules and Bootstrap 5 guidelines when making our components

Build

pnpm run build

Lint

pnpm run lint

If pnpm run lint shows issues, run this command to fix them.

pnpm run fix

Prettier

pnpm run format

Structure

Component Folder

  • Folder name always in PascalCase: Button
  • Component file in PascalCase: Button.tsx
  • Export types & interfaces inside Component file
  • Stories file in PascalCase + *.stories.tsx : Button.stories.tsx
src
  -- ComponentFolder
    -- Component.tsx
    -- Component.stories.tsx
    -- index.ts
  • Re-export the Component inside his own index file: index.ts
  • Export everything if Component has types & interfaces
export { default as Component } from './Component';
export * from './Component';

Component Guideline

  • Always document basic guideline of Component with JSDoc format. Used by Storybook to generate documentation.
/**
 * Primary UI component for user interaction
 */

Interface description

  • Always document typescript types and interface with JSDoc syntax. Used by Storybook to generate documentation.
// Interface description (e.g: TreeViewProps.tsx)
export interface ButtonProps {
  /**
   * Is this the principal call to action on the page?
   */
  primary?: boolean;
  /**
   * What background color to use
   */
  backgroundColor?: string;
  /**
   * How large should the button be?
   */
  size?: "small" | "medium" | "large";
  /**
   * Button contents
   */
  label: string;
  /**
   * Optional click handler
   */
  onClick?: () => void;
}

Index file inside src folder

  • Entry point of this React Library.
  • Import your component inside index.ts file.
export * from './Button';

Adding Icons

https://edifice-community.atlassian.net/wiki/spaces/ODE/pages/4371611649/Overview#Ajout-de-l%E2%80%99ic%C3%B4ne

Dev

You can build your component using Storybook. See README

版本与发布记录

@edifice.io/react 共发布 1,056 个版本,首次发布于 2024/09/19;过去 12 个月发布了 601 个版本。

版本发布日期距今
2.6.14latest2026/11/13今天
2.6.13-develop-b2school.202611131523162026/11/13今天
2.6.13-develop-pedago.202611131404422026/11/13今天
2.6.13-develop-b2school.202611121605542026/11/121 天前
2.6.13-develop-b2school.202611101929142026/11/112 天前
2.6.13-develop-b2school.202611101824122026/11/112 天前

其他发布通道:develop-rc → 2.0.0-develop-rc.26,develop-hotfix → 2.0.1-develop-hotfix.1736863177286,main → 2.0.1,develop-integration-nabook → 2.2.1-develop-integration-nabook.20250331112210,develop-wl → 2.3.2-develop-wl.20250925113622,fix-ENABLING-461-delete-user-transition → 2.4.0-fix-ENABLING-461-delete-user-transition.20251009160554。

关于 @edifice.io/react 的常见问题

@edifice.io/react 是什么?

Edifice React Library

如何安装 @edifice.io/react?

在项目目录运行 npm install @edifice.io/react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(18.3.1)、react-dom(18.3.1)、react-i18next(14.1.3)、react-hook-form(7.71.1)、@react-spring/web(9.7.5)、@tanstack/react-query(5.62.7)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@edifice.io/react 支持 TypeScript 吗?

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

@edifice.io/react 支持 ESM 还是 CommonJS?

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

@edifice.io/react 可以商用吗?

@edifice.io/react 使用 AGPL-3.0 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@edifice.io/react 的下载量有多少?

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

@edifice.io/react 还在维护吗?

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