PHP code example of keruyphp / keruy-bulma

1. Go to this page and download the library: Download keruyphp/keruy-bulma library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

keruyphp / keruy-bulma example snippets




declare(strict_types=1);

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();

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

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

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

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

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

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

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

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