@bpmn-io/form-js-playground

中文文档
2.2.0发布于 2026/11/06SEE LICENSE IN LICENSETypeScriptESM + CJS近 30 天下载 5.5万

A form-js playground

原始使用文档
文档目录4 节
  1. Usage
  2. Styling
  3. Resources
  4. License

@bpmn-io/form-js-playground

CI

A tool to try out and explore @bpmn-io/form-js in a playful manner.

Playground Screenshot

Usage

Integrate the playground into your application:

import { Playground } from '@bpmn-io/form-js-playground';

const schema = {
  type: 'default',
  components: [
    {
      key: 'creditor',
      label: 'Creditor',
      type: 'textfield',
      validate: {
        required: true,
      },
    },
  ],
};

const data = {
  creditor: 'John Doe Company',
};

const playground = new Playground({
  container: document.querySelector('#container'),
  schema,
  data,
});

const { schema, data } = playground.getState();

Styling

For proper styling include the necessary stylesheets, and font used:

<link
  href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap"
  rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap" rel="stylesheet" />

<link rel="stylesheet" href="https://unpkg.com/@bpmn-io/[email protected]/dist/assets/form-js.css" />
<link rel="stylesheet" href="https://unpkg.com/@bpmn-io/[email protected]/dist/assets/form-js-editor.css" />
<link rel="stylesheet" href="https://unpkg.com/@bpmn-io/[email protected]/dist/assets/form-js-playground.css" />

Resources

License

Use under the terms of the bpmn.io license.

版本与发布记录

@bpmn-io/form-js-playground 共发布 124 个版本,首次发布于 2021/10/14;过去 12 个月发布了 23 个版本。

版本发布日期距今
2.2.0latest2026/11/062 天前
2.1.12026/10/011 个月前
2.1.02026/09/281 个月前
2.0.22026/09/281 个月前
2.0.12026/09/251 个月前
2.0.02026/09/181 个月前

其他发布通道:backports → 1.15.5,alpha → 2.0.0-alpha.0。

关于 @bpmn-io/form-js-playground 的常见问题

@bpmn-io/form-js-playground 是什么?

A form-js playground

如何安装 @bpmn-io/form-js-playground?

在项目目录运行 npm install @bpmn-io/form-js-playground,或使用 pnpm add / yarn add / bun add。

@bpmn-io/form-js-playground 支持 TypeScript 吗?

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

@bpmn-io/form-js-playground 支持 ESM 还是 CommonJS?

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

@bpmn-io/form-js-playground 可以商用吗?

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

@bpmn-io/form-js-playground 的下载量有多少?

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

@bpmn-io/form-js-playground 还在维护吗?

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