@beinformed/ui

中文文档
1.70.0发布于 2026/10/22SEE LICENSE IN LICENSE.mdTypeScriptESM + CJS近 30 天下载 4283

Toolbox for be informed javascript layouts

原始使用文档
文档目录5 节
  1. ✨ Features
  2. 📦 Installation
  3. 🚀 Quick Start
  4. 📖 Documentation
  5. 💬 Questions & Feedback

@beinformed/ui

@beinformed/ui provides the core infrastructure and high-level React building blocks for applications powered by Be Informed Modular UI services.

It handles the complexities of state management, server-side rendering, and model rehydration, allowing you to focus on building rich user experiences.

✨ Features

  • Model-Driven UI: Automatically transforms Modular UI service responses into rich JavaScript Class instances (Models) that combine data with metadata and logic.
  • React-First: Comprehensive library of hooks and providers for data fetching and state interaction.
  • SSR Support: Native pipeline for Java-backed Server-Side Rendering (SSR) with state dehydration and rehydration.
  • Unified Theming: A robust design token system built on styled-components with automatic accessibility/contrast calculation.
  • Redux Integration: Built-in modules for navigation, preferences, i18n, and resource caching.

📦 Installation

Install the library via npm, yarn, pnpm:

npm install @beinformed/ui

🚀 Quick Start

To use the library, wrap your application in the initialization client. This sets up the Redux store, handles routing, and enables rehydration.

import { client } from "@beinformed/ui/react";

client({
  theme: { PRIMARY_COLOR: "#0055aa" },
  render: () => <MyApplication />,
});

And a server that is loaded in the Be Informed environment:

import { serverNoSSR } from "@beinformed/ui/react";

export const server = (request: HttpServletRequestJava) => {
  setSettings(DEFAULT_SETTINGS);
  return serverNoSSR({
    request,
    render: () => <MyServer />,
  });
};

📖 Documentation

Detailed usage guides and API references are available to help you build your application:

For comprehensive platform documentation, visit the Be Informed Plaza.

💬 Questions & Feedback

We value your input!


© 2026 Be Informed. All rights reserved.


版本与发布记录

@beinformed/ui 共发布 422 个版本,首次发布于 2020/11/06;过去 12 个月发布了 58 个版本。

版本发布日期距今
1.70.0latest2026/10/2216 天前
1.69.52026/10/071 个月前
1.69.42026/10/011 个月前
1.69.32026/09/101 个月前
1.69.22026/09/012 个月前
1.67.52026/07/213 个月前

其他发布通道:beta → 2.0.0-beta.4。

关于 @beinformed/ui 的常见问题

@beinformed/ui 是什么?

Toolbox for be informed javascript layouts

如何安装 @beinformed/ui?

在项目目录运行 npm install @beinformed/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、redux(^4.0.0)、history(^4.0.0)、polished(^4.0.0)、react-dom(^18.0.0 || ^19.0.0)、react-redux(^7.0.0 || ^8.0.0)、redux-thunk(^2.0.0)、react-router(^5.0.0)、styled-components(^5.0.0)、@dr.pogodin/react-helmet(^3.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@beinformed/ui 支持 TypeScript 吗?

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

@beinformed/ui 支持 ESM 还是 CommonJS?

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

@beinformed/ui 需要什么版本的 Node.js?

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

@beinformed/ui 可以商用吗?

@beinformed/ui 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@beinformed/ui 的下载量有多少?

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

@beinformed/ui 还在维护吗?

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