@brightlayer-ui/react-components

中文文档
8.0.6发布于 2026/11/02BSD-3-ClauseTypeScriptES Module近 30 天下载 1.8万

React components for Brightlayer UI applications

原始使用文档
文档目录6 节
  1. Installation
  2. Usage
  3. Migration from v7 to v8
  4. Browser Support
  5. Building the Library
  6. Running the demo project and React Component Library API Do…

Brightlayer UI React Components

Build npm codecov

This is a library of re-usable React components for use in Brightlayer UI applications. For the most part, these components are meant to simplify building your application by providing drop-in components that implement common use cases in Brightlayer UI and eliminate the need for multiple teams to build their own components for these.

Refer to the Component Library API documentation site for a list of available components and the document for each individual component.

Installation

To install the Brightlayer UI react components from NPM as a dependency for your project, you can run the following command in your project root:

yarn add @brightlayer-ui/react-components

Usage

See the developer documentation site for detailed information on using these components.

For use with MUI 6+, you must be using version 7 of @brightlayer-ui/react-components and version 8 of @brightlayer-ui/react-themes.

Migration from v7 to v8

With the release of version 7, Brightlayer UI React Components have been updated to use Material UI v7. The usage of the BLUI components remains the same, but there may be some updates required in your project to migrate to MUI v7.

You can refer to the official MUI Migration Documentation for details on the steps to upgrade.

Browser Support

Brightlayer UI libraries will work with any modern browser. For details, please refer to our Browser Support documentation.

For Maintainers

Building the Library

To work with this library, first clone down the repository and install dependencies:

git clone https://github.com/etn-ccis/blui-react-component-library
cd react-component-library
yarn initialize

The library can be built by running the following command. The resulting output will be in the /dist folder.

yarn build

Running the demo project and React Component Library API Docs

This repository comes with a demo project found within the /demos folder. The Showcase project (from react-showcase-demo) that shows a combination of components in the context of a realistic interface.

The react-showcase-demo is deployed as part of the Brightlayer UI continuous integrations.

The second project found within the /docs folder is the React Component Library API documentation that allows you to see the components in isolation and interact with their properties.

The React Component Library is deployed as part of the Brightlayer UI continuous integrations.

You can build, link, and start the applications in a single step by running

yarn start:showcase

or

yarn start:docs

from the root directory.

版本与发布记录

@brightlayer-ui/react-components 共发布 43 个版本,首次发布于 2021/11/12;过去 12 个月发布了 10 个版本。

版本发布日期距今
8.0.6latest2026/11/026 天前
8.0.6-alpha.2alpha2026/10/2910 天前
8.0.6-alpha.32026/10/2910 天前
8.0.6-alpha.12026/10/011 个月前
8.0.6-alpha.02026/09/241 个月前
8.0.52026/07/243 个月前

其他发布通道:beta → 6.1.1-beta.0,alpha → 8.0.6-alpha.2。

关于 @brightlayer-ui/react-components 的常见问题

@brightlayer-ui/react-components 是什么?

React components for Brightlayer UI applications

如何安装 @brightlayer-ui/react-components?

在项目目录运行 npm install @brightlayer-ui/react-components,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.1.0)、react-dom(^19.1.0)、@mui/material(^7.1.1)、@emotion/react(^11.7.1)、@emotion/styled(^11.6.0)、@mui/icons-material(^7.1.1)、@brightlayer-ui/colors(^3.3.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@brightlayer-ui/react-components 支持 TypeScript 吗?

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

@brightlayer-ui/react-components 支持 ESM 还是 CommonJS?

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

@brightlayer-ui/react-components 可以商用吗?

@brightlayer-ui/react-components 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@brightlayer-ui/react-components 的下载量有多少?

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

@brightlayer-ui/react-components 还在维护吗?

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