1. Go to this page and download the library: Download nawawishkid/ui-factory 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/ */
nawawishkid / ui-factory example snippets
namespace BootstrapUI;
use UIFactory\Component;
class Button extends Component
{
public function markup($props) : string
{
return '<button class="btn btn-primary">Click me!</button>';
}
}
function button() {
return '<button class="btn btn-primary">Click me!</button>';
}
class Button extends Component
{
private $props = [
'label' => 'Click me!'
'class' => 'btn btn-primary'
];
public function markup($props) : string
{
return (
<<<HTML
<button class="$props->class">
$props->label
</button>
HTML
);
}
}