@ginkgo-bioworks/react-json-schema-form-builder

中文文档
4.2.0发布于 2026/09/29Apache-2.0TypeScriptESM + CJS近 30 天下载 3.2万

React Component for visually configuring a JSON Schema-based form

原始使用文档
文档目录5 节
  1. Requirements
  2. Quickstart
  3. Usage
  4. Contributing
  5. License

React JSON Schema Form Builder

npm CI License GitHub issues

This repository contains code for a React JS Component called the FormBuilder that allows the user to visually configure a JSON Schema encoded form by dragging, dropping, and editing card elements. An example use case for this tool could be for building an app that allows users to create and distribute their own surveys. The React JSON Schema Form Builder provides components to allow users to dynamically build such survey forms. The Form Builder is also customizable, and can incorporate novel form elements (like a special email address or file upload input), specified by the developer building the survey creation app.

This component is wrapped around a demo app that demonstrates how the tool can be used in conjunction with a code editor and Mozilla's React JSON schema form viewer to build a form and maintain a live, code representation of it in real time.

The Form Builder is available as an NPM package here.

View the Form Builder in action here

More extensive documentation is available here

Requirements

  • React 19+
  • Node.js 20+ (LTS)
  • Material-UI (MUI) 7+

Quickstart

npm i --save @ginkgo-bioworks/react-json-schema-form-builder @mui/material @emotion/react @emotion/styled

Usage

import React, { useState } from 'react';
import { FormBuilder } from '@ginkgo-bioworks/react-json-schema-form-builder';

function Example() {
  const [schema, setSchema] = useState('{}');
  const [uischema, setUiSchema] = useState('{}');

  return (
    <FormBuilder
      schema={schema}
      uischema={uischema}
      onChange={(newSchema, newUiSchema) => {
        setSchema(newSchema);
        setUiSchema(newUiSchema);
      }}
    />
  );
}

export default Example;

For more usage examples, see the Usage documentation page

Contributing

See the Contributing page for information about improving the Form Builder.

License

Copyright 2020-2026 Ginkgo Bioworks, Inc. Licensed Apache 2.0.

版本与发布记录

@ginkgo-bioworks/react-json-schema-form-builder 共发布 40 个版本,首次发布于 2020/12/12;过去 12 个月发布了 3 个版本。

版本发布日期距今
4.2.0latest2026/09/291 个月前
4.1.02026/01/0410 个月前
4.0.02026/01/0310 个月前
3.0.12024/04/302 年前
3.0.02023/09/263 年前
2.10.22023/04/243 年前

关于 @ginkgo-bioworks/react-json-schema-form-builder 的常见问题

@ginkgo-bioworks/react-json-schema-form-builder 是什么?

React Component for visually configuring a JSON Schema-based form

如何安装 @ginkgo-bioworks/react-json-schema-form-builder?

在项目目录运行 npm install @ginkgo-bioworks/react-json-schema-form-builder,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)、@mui/material(^7.0.0 || ^9.0.0)、@emotion/react(^11.14.0)、@emotion/styled(^11.14.0)、@mui/icons-material(^7.0.0 || ^9.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ginkgo-bioworks/react-json-schema-form-builder 支持 TypeScript 吗?

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

@ginkgo-bioworks/react-json-schema-form-builder 支持 ESM 还是 CommonJS?

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

@ginkgo-bioworks/react-json-schema-form-builder 需要什么版本的 Node.js?

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

@ginkgo-bioworks/react-json-schema-form-builder 可以商用吗?

@ginkgo-bioworks/react-json-schema-form-builder 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@ginkgo-bioworks/react-json-schema-form-builder 的下载量有多少?

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

@ginkgo-bioworks/react-json-schema-form-builder 还在维护吗?

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