# @govbr-ds/react-components 中文文档

规范地址：https://npmcn.com/package/%40govbr-ds/react-components/

版本：2\.15\.1
npm 元数据更新时间：2026-02-06T04:46:50.776Z
中文译文更新时间：2026-11-17T17:34:11.700Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40govbr-ds/react-components
原文对照：https://npmcn.com/package/%40govbr-ds/react-components/?lang=original
项目主页：https://govbr-ds.gitlab.io/bibliotecas/react-components
源码仓库：https://gitlab.com/govbr-ds/bibliotecas/react-components

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.3 MB，189 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：4 个
- peer 依赖：react \>=18\.0\.0，react-dom \>=18\.0\.0
- 首次发布：2022-09-21T17:26:31.795Z
- 最新版本发布：2026-02-06T04:46:50.547Z
- 近 30 天下载量：4745（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：26（近 12 个月 20 个）

## 中文简介

Bibliotica de 组件反应 碱基不发生GOVBR-DS

## 安装

```sh
npm install @govbr-ds/react-components
```

也可以使用：`pnpm add @govbr-ds/react-components`、`yarn add @govbr-ds/react-components`、`bun add @govbr-ds/react-components`

## README

# 反应组件 - GOVBR-DS

[![Licença](https://img.shields.io/gitlab/license/govbr-ds/bibliotecas/react-components?label=licen%C3%A7a&style=for-the-badge)](https://gitlab.com/govbr-ds/bibliotecas/react-components/-/blob/main/LICENSE) [![Última release](https://img.shields.io/gitlab/v/release/govbr-ds/bibliotecas/react-components?label=%C3%9Altima+Release&sort=semver&style=for-the-badge)](https://gitlab.com/govbr-ds/bibliotecas/react-components/-/releases) [![Cobertura de Testes](https://img.shields.io/gitlab/pipeline-coverage/govbr-ds/bibliotecas/react-components?branch=main&label=Cobertura+de+Testes&style=for-the-badge)](https://gitlab.com/govbr-ds/bibliotecas/react-components/-/pipelines?ref=main) [![Downloads/Mês](https://img.shields.io/npm/dm/@govbr-ds/react-components?label=Downloads/M%C3%AAs&style=for-the-badge)](https://www.npmjs.com/package/@govbr-ds/react-components) [![Storybook](https://img.shields.io/badge/Storybook-FF4785?logo=storybook&logoColor=white&style=for-the-badge)](https://govbr-ds.gitlab.io/bibliotecas/react-components)

组成部分圣经 [反应](https://react.dev/) baseada nas e specialaçõs does (英语:baseada nas e specialaçõs (baseada nas e specialaçõs do)) 维基语录链接中相关的原始文献: 维基语录链接 [帕德朗·德·戈维诺](https://www.gov.br/ds) (GOVBR-DS) (英语).

## 技术

Este projeto está sendo desenvolvido com: 互联网档案馆的存檔,存档日期2011-12-02

1.  [反应](https://reactjs.org/)
2.  [类型脚本](https://www.typescriptlang.org/)
3.  [欢乐](https://jestjs.io/) 打开 [反应测试库](https://testing-library.com/docs/react-testing-library/intro/)
4.  [高级](https://prettier.io/), (中文(简体) ), [ESLint 语录](https://eslint.org/) 打开 [编辑器配置](https://editorconfig.org/)
5.  [故事书](https://storybook.js.org/)
6.  [维特](https://vitejs.dev/)

萨伯·马伊斯·德塔尔斯 [官方文件](https://react.dev/)。 。 。 .

## 英斯特拉桑

1.  装入元件 反应:
    
    ```sh
    npm install --save @govbr-ds/react-components
    ```
    
2.  (原始内容存档于2019-10-21). Instalar a bibliotica de ícones Font Cousne Free na versão 5.x:
    
    ```sh
    npm install --save @fortawesome/fontawesome-free@^5.11.2
    ```
    
3.  进口 进口 进口 _切入点_ 厄立特里亚 `src/index.jsx`, (中文(简体) ), `src/index.tsx` 尔 `src/main.tsx`:
    
    ```javascript
    /* Arquivo src/index.jsx, src/index.tsx ou src/main.tsx */
    
    import "@fortawesome/fontawesome-free/css/all.min.css";
    import "@govbr-ds/core/dist/core.min.css";
    ```
    
4.  指定为字体 _原始线_ 电子 _拉莱韦_(原始内容存档于2018-09-21) (英语). Utilizadas pelo GOVBR-DS, ao `<head>` 做阿尔基沃 `index.html` 尔 `public/index.html` 做亲笔报告( d)_行动1_页:1 _切入点_ 联合国_第2条_:
    
    _行动1:_
    
    ```html
    <!-- Arquivo index.html ou public/index.html -->
    
    <html>
      <head>
        <!-- outras entradas do <head> ... -->
    
        <!-- Fonte Rawline-->
        <link href="https://fonts.cdnfonts.com/css/rawline" rel="stylesheet" />
    
        <!-- Fonte Raleway-->
        <link
          rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700,800,900&amp;display=swap"
        />
      </head>
      <!-- restante do documento -->
    </html>
    ```
    
    尔
    
    _行动2:_
    
    ```javascript
    /* Arquivo src/index.jsx, src/index.tsx ou src/main.tsx */
    
    import "./assets/arquivo-fonte-rawline.css";
    import "./assets/arquivo-fonte-raleway.css";
    ```
    

## 利用

国家概况 `@govbr-ds/react-components` os 组成 necessários em sua aplicação。 Como o pacote exporta os tipos TypeScript dos 组件,se o seu projeto utilizar TypeScript, poderá se aproveitar do recentso de auto-completar as propriedate. 中国植物物种信息数据库.

实例 :

```jsx
import { BrButton } from "@govbr-ds/react-components";

const MyComponent = () => {
   return (
      <div>
         <BrButton primary size="large">My Button</Button>
      </div>
   )
}
```

## 文献和实例

以“propridedas dos partments e exemplos de utilização podem ser astos no”为代表的文档 [故事书](https://govbr-ds.gitlab.io/bibliotecas/react-components/)。 。 。 .

## 孔布里奇奥

麻烦你, 理发师 [几内亚](https://npmcn.com/package/%40govbr-ds/react-components/CONTRIBUTING.md "Guia de Contribuição")。 。 。 .

#### 第 二 部 分

(原始内容存档于2018-10-21) (英语). A unica ferramenta estritamente necessária e o [节点.js](https://nodejs.org/) (原始内容存档于2012-10-12). em alguma versão **18.x 国家**

#### 比利时共和国

Após channar o projeto, centre em seu depretório pelo terminal e 执行 o comando abaixo para instalar as dependências necessárias :

```sh
npm install
```

Depois 使用 Os 脚本 disponíveis, acordo com a necessidade, executando compendos no paderão : 使用 os 脚本 disponíveis, de acordo com a necessidade, 执行 executando compendos no padrão:

```sh
npm run <nome-do-script>
```

**脚本 :**

-   `generate`执行 [倾斜](https://plopjs.com/) (原始内容存档于2018-09-21) (英语). para criar um novo partmente, utilizando s模板 pré-definidos, com um uma estrutura inficial de partmente, testes unitários e Storybook. (原始内容存档 `src/components/NomeDoComponente`。实例:
    
    ```bash
    $ npm run generate
    
    @govbr-ds/react-components@2.0.0 generate
    plop --plopfile ./generators/plopfile.js
    
    Nome do componente? BrTable
    
    ✔  ++ ~/react-components/src/components/BrTable/index.tsx
    ✔  ++ ~/react-components/src/components/BrTable/stories.tsx
    ✔  ++ ~/react-components/src/components/BrTable/BrTable.test.tsx
    ```
    
-   `test`: Executa todos os testers. : do取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取.
    
-   `test:watch`: Executa to dos os testes em (英语) _监视模式_。 。 。 .
    
-   `coverage`: Verifica a cobertura de testes do projeto. (原始内容存档于2018-09-29) (英语).
    
-   `dev`: Inicia uma apliicação React, em modo de desenvolvimento, permanentindo testar os 组件 Criados em um Showcase. 中国植物物种信息数据库.
    
-   `build:lib`: Compila e empacota a bibliotica de partes and a unponibiliza no pretório 互联网档案馆的存檔,存档日期2013-12-02 `dist`。 。 。 .
    
-   `build:showcase`支持或拒绝 `showcase/`。 。 。 .
    
-   `storybook`: Executa localmente a do Storybook. 存档副本.
    
-   `storybook:build`(原始内容存档于2018-03-26) (英语). Prepara do do sormbook para implicação emplocation a proposibiliza no terrotorio `storybook/`。 。 。 .
    
-   `lint`\* 原文照发 `report-eslint.html`。 。 。 .
    
-   `commit`: " 家庭义务 " .
    

#### 提交

利用 " e " 支行 Por favority 观察一个文档 nação na nossa [维基百科](https://gov.br/ds/wiki/ "Wiki") (原始内容存档于2018-06-25) (英语). parameter sobre os nossos pader.

## 报告错误/必要性

{\\fn黑体\\fs22\\bord1\\shad0\\3aHBE\\4aH00\\fscx67\\fscy66\\2cHFFFFFF\\3cH808080}你这混蛋 [问题](https://gitlab.com/govbr-ds/bibliotecas/react-components/-/issues/new) e. 国家、地区、领土、领土、领土、领土、领土、领土、领土、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、财产、 _特性_. por favor, preencha o modelo que mais se encaixa na sua necessidade com o máximo de detalhes possíveis. 中国植物物种信息数据库.

不,不,不,不,不,不,不,不.

## 普里西萨德阿尤达?

> 麻烦你, **无** 说得没错!

(一) 国家、区域、区域、区域、区域、区域、区域、区域、区域、区域、区域、区域、区域、区域、区域)

-   现场操作 GOVBR-DS [http://gov.br/ds (中文(简体) )](http://gov.br/ds)
-   反应组件 [https://gitlab.com/govbr-ds/bibliotecas/ react-组件/](https://gitlab.com/govbr-ds/bibliotecas/react-components/)
-   乌山多不相通 [https://discord.gg/U5GwPfqhUP 页面存档备份,存于互联网档案馆](https://discord.gg/U5GwPfqhUP)

## 十字军

欧 [反应组件 - GOVBR-DS](https://gitlab.com/govbr-ds/bibliotecas/react-components "React Components - GOVBR-DS") 冰球赛 [公务员](https://www.serpro.gov.br/ "SERPRO | Serviço Federal de Processamento de Dados") 电子 [数据预览](https://www.dataprev.gov.br/ "Dataprev | Empresa de Tecnologia e Informações da Previdência Social"),是一个共同参与.

## 语法

Neste projeto utilizamos a licença MIT. 中国植物物种信息数据库.

## 常见问题

### @govbr-ds/react-components 是什么？

Bibliotica de 组件反应 碱基不发生GOVBR-DS

### 如何安装 @govbr-ds/react-components？

在项目目录运行 npm install @govbr-ds/react-components，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=18\.0\.0）、react-dom（\>=18\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @govbr-ds/react-components 支持 TypeScript 吗？

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

### @govbr-ds/react-components 支持 ESM 还是 CommonJS？

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

### @govbr-ds/react-components 可以商用吗？

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

### @govbr-ds/react-components 的下载量有多少？

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

### @govbr-ds/react-components 还在维护吗？

最新版本 2\.15\.1 发布于 2026/02/06（9 个月前）；至今共发布 26 个版本，其中过去 12 个月发布了 20 个；首次发布于 2022/09/22。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

