@formio/bootstrap

中文文档
4.0.6发布于 2026/11/14MITESM + CJS零依赖近 30 天下载 21.2万

Bootstrap templates for Form.io forms

原始使用文档
文档目录5 节
  1. Official Documentation
  2. Using Bootstrap 3
  3. Using Bootstrap 4
  4. Using Bootstrap 5
  5. Script

Form.io Bootstrap Templates

This repository will change the rendering of forms in formio.js so that it uses html and classes compatible with Bootstrap 3, Bootstrap 4, and Bootstrap 5 frameworks.

Official Documentation

For the latest documentation, release information, and guides, always refer to the official Form.io Help Documentation available here:

https://help.form.io

Using Bootstrap 3

import bootstrap3 from '@formio/bootstrap/bootstrap3';
import { Formio } from 'formiojs';
Formio.use(bootstrap3);

Using Bootstrap 4

import bootstrap4 from '@formio/bootstrap/bootstrap4';
import { Formio } from 'formiojs';
Formio.use(bootstrap4);

Using Bootstrap 5

import bootstrap5 from '@formio/bootstrap/bootstrap5';
import { Formio } from 'formiojs';
Formio.use(bootstrap5);

Script

Formio.Templates.framework = 'bootstrap3';

If icon is not show

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script>
  Formio.icons = "fontawesome"
</script>

版本与发布记录

@formio/bootstrap 共发布 112 个版本,首次发布于 2023/06/07;过去 12 个月发布了 15 个版本。

版本发布日期距今
4.0.6latest2026/11/142 天前
4.0.52026/08/272 个月前
4.0.4-pdf515.02026/08/113 个月前
4.0.42026/08/113 个月前
4.0.4-api99.0rc2026/07/273 个月前
4.0.32026/07/213 个月前

其他发布通道:dev → 3.1.0-dev.1-dev.126.a9ba155,3_1_x → 3.1.2-rc.3,3_0_x → 3.0.2-rc.6,3_2_x → 3.2.0-rc.0,rc → 4.0.4-api99.0。

关于 @formio/bootstrap 的常见问题

@formio/bootstrap 是什么?

Bootstrap templates for Form.io forms

如何安装 @formio/bootstrap?

在项目目录运行 npm install @formio/bootstrap,或使用 pnpm add / yarn add / bun add。

@formio/bootstrap 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/formio__bootstrap 是否存在。

@formio/bootstrap 支持 ESM 还是 CommonJS?

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

@formio/bootstrap 可以商用吗?

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

@formio/bootstrap 的下载量有多少?

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

@formio/bootstrap 还在维护吗?

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