keruyphp/keruy-bulma 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

keruyphp/keruy-bulma

最新稳定版本:v1.0.0

Composer 安装命令:

composer require keruyphp/keruy-bulma

包简介

Flexible fluent PHP DSL for Bulma.

README 文档

README

Simple fluent PHP DSL for applying Bulma classes to keruy-html elements.

Installation

composer require keruyphp/keruy-bulma

Minimal setup

<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use KeruyPHP\KeruyBulma\Bulma;
use KeruyPHP\KeruyHtml\Html;
use KeruyPHP\KeruyHtml\HtmlElement;

HtmlElement::extend('bulma', fn(HtmlElement $el) => new Bulma($el));

echo Html::button('Save')
	->bulma()->button()->isPrimary()->isRounded();

Main Bulma elements

Start with a normal keruy-html element, then call bulma().

Title

echo Html::h1('Dashboard')
	->bulma()->title()->is_1();

Button

echo Html::button('Save')
	->bulma()->button()->isPrimary()->isRounded();

Notification

echo Html::div('Profile updated')
	->bulma()->notification()->isSuccess();

Columns

echo Html::div(function () {
	Html::div('Left column')->bulma()->column();
	Html::div('Right column')->bulma()->column();
}));

Input

echo Html::input(['type' => 'text'])
	->bulma()->input()->isRounded();

Tag

echo Html::span('New')
	->bulma()->tag()->isInfo()->isRounded();

Helpers

Bulma helpers are available through helpers().

echo Html::span('Info text')
	->bulma()->helpers()->textColor()->hasTextInfo();

Returning to HtmlElement

Bulma methods return helper objects. Call end() to get the original HtmlElement back.

echo Html::button('Open')
	->bulma()->button()->isPrimary()->end()
	->prop('type', 'button')
	->class('custom-button');

Notes

  • keruy-bulma works on top of keruy-html.
  • You can still use normal HtmlElement methods like class(), prop(), attrs() and pretty().
  • Many Bulma modifier methods are virtual and are converted from camelCase to kebab-case classes automatically.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2026-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固