@allxsmith/bestax-bulma

中文文档
5.65.0发布于 2026/11/05MITTypeScriptESM + CJS构建来源已验证近 30 天下载 1.4万

Component library based on React, Bulma, with Agent Skills and MCP

原始使用文档
文档目录15 节
  1. 📚 Comprehensive Documentation
  2. 🚀 Getting Started
  3. 1. Install the package
  4. 2. Import the CSS
  5. 3. (Optional) Add an Icon Library
  6. 4. Quick Example
  7. 5. Theming and Dark Mode
  8. ⭐ Why Choose bestax-bulma?
  9. 📦 NPM Package
  10. 🔒 Hardened by default
  11. 📚 Documentation
  12. 📖 Storybook
  13. 🤖 For AI Tools
  14. 🙏 Attribution
  15. License

@allxsmith/bestax-bulma

npm version npm downloads TypeScript Coverage Bulma License: MIT Socket Badge OpenSSF Scorecard OpenSSF Best Practices npm provenance Security policy

TypeScript-first React component library for the Bulma v1 CSS framework — 80+ fully typed, tree-shakeable components, including extras like Carousel, Dialog, Sidebar, Steps, and date/time pickers.

Requires React ^18 || ^19. Bulma v1 is the only runtime dependency and installs automatically.

Part of the bestax monorepo — see also create-bestax for scaffolding new projects.


📚 Comprehensive Documentation

Looking for full documentation, guides, API references, and best practices?
👉 Visit our official docs at https://bestax.io

The documentation site is the best place to learn about all bestax-bulma features, usage patterns, and updates. We strongly recommend using the docs as your primary resource!


🚀 Getting Started

Starting fresh? Scaffold a ready-to-go app instead: npm create bestax@latest my-app.

1. Install the package

npm install @allxsmith/bestax-bulma
# or
pnpm add @allxsmith/bestax-bulma

2. Import the CSS

The library bundles its own CSS (Bulma v1 + the bestax extras). Import it once in your main JS/TS file:

import '@allxsmith/bestax-bulma/bestax.css';

Prefer stock Bulma? That works too — add extras.css for the bestax-only components' styles:

import 'bulma/css/bulma.min.css';
import '@allxsmith/bestax-bulma/extras.css';

More flavors are shipped as subpath exports — prefixed classes (versions/bestax-prefixed.css + <ConfigProvider classPrefix="bestax-">), no-helpers, no-dark-mode, and raw SCSS at @allxsmith/bestax-bulma/scss/*. See the installation guide.

3. (Optional) Add an Icon Library

Five icon libraries are supported as optional peer dependencies: Font Awesome (@fortawesome/fontawesome-free), Material Design Icons (@mdi/font), ionicons, material-icons, and material-symbols.

npm install @fortawesome/fontawesome-free

Set the default for your whole app with ConfigProvider, e.g. <ConfigProvider iconLibrary="fa">.

4. Quick Example

import '@allxsmith/bestax-bulma/bestax.css';
import { Button } from '@allxsmith/bestax-bulma';

function App() {
  return (
    <Button color="primary" onClick={() => alert('Clicked!')}>
      Click Me
    </Button>
  );
}

export default App;

5. Theming and Dark Mode

Wrap your app in Theme to override Bulma's --bulma-* CSS variables and control the color scheme:

import { Theme } from '@allxsmith/bestax-bulma';

<Theme isRoot colorMode="system">
  {/* colorMode: 'light' | 'dark' | 'system' */}
  <App />
</Theme>;

⭐ Why Choose bestax-bulma?

  • Supports the latest Bulma v1.x Other React Bulma libraries are stuck on Bulma 0.9.4 — bestax-bulma is built for the future.
  • 80+ components All of Bulma v1, plus extras: Carousel, Dialog, Sidebar, Steps, Autocomplete, Taginput, DateInput/TimeInput/DateTimeInput pickers, and more. (Migrating from v2? Snackbar merged into Toast.)
  • Dark mode & theming built in Theme colorMode, --bulma-* variable overrides, and prefixed-class builds via ConfigProvider.
  • Just one dependency: Bulma Every Bulma library depends on it — we ship it automatically. Clean install, fewer security concerns.
  • Tree-shakeable ESM Import only what you use; your bundler drops the rest. A CJS build is there for require.
  • 99% unit test coverage Enforced in CI by the Vitest config — not just claimed.
  • 100% TypeScript Full type safety for you and your team.
  • Active developer support Issues? Questions? PRs? Get fast responses and real improvements.

📦 NPM Package

View the package on npmjs:
👉 https://www.npmjs.com/package/@allxsmith/bestax-bulma


🔒 Hardened by default

This package is one runtime dependency deep (Bulma) and is published under a deliberately strict pipeline:

  • Signed provenance — every release carries a sigstore attestation linking the tarball to the exact commit and CI run that built it. Verify it in the Provenance section of the npm page, or run npm audit signatures in your project.
  • npm OIDC trusted publishing — short-lived, per-run credentials; no long-lived NPM_TOKEN exists to be stolen. Release commits and tags are GPG-signed.
  • Socket.dev scans every PR for malware, install scripts, obfuscated code, and privilege escalation before it can reach main.
  • Dependencies are a deliberate act — install scripts are blocked unless individually allow-listed, freshly published versions are refused for 3 days, and CI installs only what the reviewed lockfile resolves.
  • Every GitHub Action is pinned to a full commit SHA, so a compromised action release can't roll silently into a build of this package.
  • CodeQL, Dependency Review, and Dependabot run continuously, alongside a high-severity pnpm audit gate.
  • Layered AI review before merge — CodeRabbit plus an independent adversarial Claude review (a different model from the one writing AI-authored changes), on top of required green CI, an approving review, and a human merge.

Full detail: SECURITY.md · Security guide


📚 Documentation

For full documentation, guides, and best practices, please use our official docs site:

👉 https://bestax.io

Always refer to the documentation site first:
It's the most complete and up-to-date source for everything bestax-bulma!


📖 Storybook

Explore live, interactive component examples in our Storybook:

👉 https://bestax.io/storybook


🤖 For AI Tools

Building with an AI agent (Claude Code, Cursor, Copilot)? bestax-bulma ships LLM-optimized docs:

  • 📘 LLMs guide — how to use the library with AI tools

  • 📄 llms.txt — curated index · llms-full.txt — the full docs in one file · every docs page is also served as raw markdown

  • 📦 In the npm package — the tarball ships llms.txt, AGENTS.md, and CLAUDE.md pointer files, so agents exploring node_modules land on these resources by filename

  • 🧩 Agent Skills — teach your agent the bestax way:

    SkillUse it when…
    bestax-layout-scaffoldTurning a high-level request (dashboard, landing page, …) into a responsive page
    bestax-formBuilding forms — Field/Control composition and the full input inventory
    bestax-themingCustomizing colors, fonts, dark mode via Theme and --bulma-* variables
    bestax-custom-componentBuilding a new custom component beyond stock Bulma, the bestax way
    bestax-iconsAdding icons — Icon/IconText and the five supported icon libraries
    bestax-optimizeShrinking the built CSS — flavor builds, modular Sass, import hygiene
    bestax-migrateMoving an app off react-bulma-components (v4) onto bestax-bulma
    npx skills add https://github.com/allxsmith/bestax --skill bestax-layout-scaffold
    

    New projects get the skills automatically with npm create bestax@latest my-app --skills (plus a generated CLAUDE.md).


🙏 Attribution

bestax-bulma is built on top of the incredible Bulma CSS framework, © Jeremy Thomas and licensed under the MIT License, whose notice ships with the package in THIRD-PARTY-NOTICES.md. Some example content and documentation is adapted from the Bulma website (CC BY-NC-SA 4.0), © Jeremy Thomas.

If you find Bulma useful, please consider sponsoring Jeremy Thomas to support its continued development.

We are not affiliated with Bulma or Jeremy Thomas in any way — we're just big fans of the Bulma framework!

License

Source code licensed MIT

版本与发布记录

@allxsmith/bestax-bulma 共发布 172 个版本,首次发布于 2025/07/06;过去 12 个月发布了 137 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.65.0latest2026/11/051 天前
5.64.02026/11/051 天前
5.63.02026/11/041 天前
5.62.02026/11/041 天前
5.61.02026/11/042 天前
5.60.02026/11/032 天前

关于 @allxsmith/bestax-bulma 的常见问题

@allxsmith/bestax-bulma 是什么?

Component library based on React, Bulma, with Agent Skills and MCP

如何安装 @allxsmith/bestax-bulma?

在项目目录运行 npm install @allxsmith/bestax-bulma,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、react-dom(^18.0.0 || ^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@allxsmith/bestax-bulma 支持 TypeScript 吗?

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

@allxsmith/bestax-bulma 支持 ESM 还是 CommonJS?

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

@allxsmith/bestax-bulma 需要什么版本的 Node.js?

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

@allxsmith/bestax-bulma 可以商用吗?

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

@allxsmith/bestax-bulma 的下载量有多少?

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

@allxsmith/bestax-bulma 还在维护吗?

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