@dynamic-framework/ui-react

中文文档
2.12.1发布于 2026/10/27https://github.com/dynamic-framework/dynamic-ui/blob/master/LICENSE.mdTypeScriptESM + CJS构建来源已验证近 30 天下载 3314

React Dynamic Framework

原始使用文档
文档目录7 节
  1. Getting Started
  2. Requirements
  3. Browser Support
  4. Installation
  5. CSS Distribution Change
  6. Development Commands
  7. Documentation and Useful Links

Dynamic UI

npm version Build & Publish npm downloads License

Build financial applications with React components and customizable templates designed for micro frontend integration.

Getting Started

Requirements

  • Node.js >= 22.0.0

Browser Support

.browserslistrc declares the minimum supported browsers for both the JavaScript and the CSS of the library:

BrowserMinimum
Chrome / Edge111
Firefox121 (and the current ESR)
Safari / iOS Safari16.2

The floor comes from features the library already relies on: color-mix() in table variant colors and the file input button hover (Chrome 111, Safari 16.2), and :has() in form validation and input group styles (Firefox 121).

  • The library ships modern JavaScript as is: tsc targets ES2017 syntax, but there is no API transpilation or polyfills (core-js). Dependencies such as React or framer-motion have their own minimums.
  • npm run eslint checks src with eslint-plugin-compat against .browserslistrc. It detects global APIs (queueMicrotask, Object.fromEntries, …) but not instance methods (.at(), .flatMap(), MediaQueryList.addEventListener), so review those by hand.
  • npm run stylelint:compat checks the compiled dist/css/dynamic-ui.min.css (run npm run build first). It ignores features no version of a target browser supports, such as cursor on iOS or scrollbar-width styling, because they only degrade the experience. caniuse-lite has no data for color-mix(), so this check does not catch it either.
  • autoprefixer reads the same file when building the CSS.

Supporting older browsers requires refactoring that code and adding polyfills; open an issue first.

Installation

npm install @dynamic-framework/ui-react

For more details, visit the npm package page.

CSS Distribution Change

Important: Starting from version 2.3.0, only dynamic-ui.css and dynamic-ui.min.css are distributed. The previous variants dynamic-ui-root.css and dynamic-ui-non-root.css have been removed to simplify upgrades and avoid desynchronization issues.

  • To customize design tokens or variables, include dynamic-ui.css and override the variables you need in your own stylesheet or snippet.
  • All default variables are included in the main bundle, ensuring safe upgrades and consistent behavior.
  • For advanced customization, refer to the Storybook design tokens documentation and docs.modyo.com.

Development Commands

For local development and testing, you can use the following commands after clone the project:

  • Install deps: Install required deps for development

    npm install
    
  • Build: Compiles the project for distribution.

    npm run build
    
  • Test: Runs all unit tests.

    npm test
    
  • Test with Coverage: Runs unit tests and generates a coverage report.

    npm run test:coverage
    
  • Storybook: Starts the Storybook development server to browse components.

    npm run storybook
    


Made with 💚 by Modyo

版本与发布记录

@dynamic-framework/ui-react 共发布 109 个版本,首次发布于 2023/07/26;过去 12 个月发布了 41 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.12.1latest2026/10/2717 天前
2.12.02026/10/2222 天前
2.11.02026/10/071 个月前
2.10.02026/09/112 个月前
2.9.02026/09/082 个月前
2.8.02026/08/133 个月前

其他发布通道:legacy → 1.36.5,dev → 2.0.0-dev.24。

关于 @dynamic-framework/ui-react 的常见问题

@dynamic-framework/ui-react 是什么?

React Dynamic Framework

如何安装 @dynamic-framework/ui-react?

在项目目录运行 npm install @dynamic-framework/ui-react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18 <20)、i18next(>=25 <26)、react-dom(>=18 <20)、framer-motion(>=12 <13)、react-i18next(>=16 <17)、react-hot-toast(>=2 <3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 dynamic-theme-expand、dynamic-theme-validate,可以用 npx dynamic-theme-expand 直接运行。

@dynamic-framework/ui-react 支持 TypeScript 吗?

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

@dynamic-framework/ui-react 支持 ESM 还是 CommonJS?

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

@dynamic-framework/ui-react 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dynamic-framework/ui-react 可以商用吗?

@dynamic-framework/ui-react 使用 https://github.com/dynamic-framework/dynamic-ui/blob/master/LICENSE.md 许可。声明的许可为 https://github.com/dynamic-framework/dynamic-ui/blob/master/LICENSE.md,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@dynamic-framework/ui-react 的下载量有多少?

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

@dynamic-framework/ui-react 还在维护吗?

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