@budibase/bbui

中文文档
3.50.0发布于 2026/10/19MPL-2.0ES Module近 30 天下载 1.2万

A UI solution used in the different Budibase projects.

原始使用文档
文档目录7 节
  1. Install
  2. Example workflow to create a component
  3. Guidelines
  4. Making components
  5. Using components and the styleguide
  6. TODO
  7. Other

Budibase bbui

A package that handles all common components across the Budibase organisation. You can find the current live version Here.

Install

  1. Clone
  2. npm install
  3. npm run svench

(Note: yarn won't work!)

Example workflow to create a component

  1. Create a file: Headline.svelte
  2. Create a Svench file: Headline.svench
  3. Build component and add variants to the Svench file.
  4. Once done, re-export the file in src/index.js.
  5. Publish, update the package in the main project and profit.

Guidelines

Making components

  1. Think about re-usability
  2. Use the css custom properties (variables) that are in the css stylesheet. This makes it easy to tweak things later down the line.
  3. Opt to forward events (<button on:click> for example) rather than using callbacks.
  4. Avoid adding margins to the outermost container of the component.

Using components and the styleguide

  1. Get familiar with the different props that exist on the component. If something vital is missing, make a PR and add it.
  2. Take advantage of the css custom properties in the stylesheet and avoid writing hard-coded values.
  3. Since there is no margin on the components, think about the structure of the DOM and how to achieve correct spacing, etc. This can be done using css grid + grid gap or with a container div where you specify a padding or margin. The best solution depends on the circumstance.

TODO

  • Figure out a good documentation situation
  • Add testing suite (E2E using Playwright?)

Other

The project uses Svench. It is somewhat akin to Storybook but a lot less bloated and much easier to setup. It also supports HMR for quick development.

版本与发布记录

@budibase/bbui 共发布 3,268 个版本,首次发布于 2020/05/26;过去 12 个月发布了 151 个版本。

版本发布日期距今
3.50.0latest2026/10/1920 天前
3.49.02026/10/1227 天前
3.48.02026/10/051 个月前
3.47.02026/09/281 个月前
3.46.02026/09/211 个月前
3.45.02026/09/141 个月前

其他发布通道:develop → 2.11.27-alpha.1,2.12.6-alpha.1 → 2.12.6-alpha.1,2.12.8 → 2.12.8,2.12.12 → 2.12.12,2.13.0 → 2.13.0,2.13.2 → 2.13.2。

关于 @budibase/bbui 的常见问题

@budibase/bbui 是什么?

A UI solution used in the different Budibase projects.

如何安装 @budibase/bbui?

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

@budibase/bbui 支持 TypeScript 吗?

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

@budibase/bbui 支持 ESM 还是 CommonJS?

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

@budibase/bbui 可以商用吗?

@budibase/bbui 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@budibase/bbui 的下载量有多少?

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

@budibase/bbui 还在维护吗?

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