Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 971 Bytes

README.md

File metadata and controls

55 lines (36 loc) · 971 Bytes

PHP UI Kit

A toolkit for developing universal web interfaces with support for multiple CSS frameworks.

Visitor Badge

Documentation

Installation

composer require robinn/uikit

Basic Usage

Simply print everything with echo.

ob_start();

echo 'HTML code';
echo alert('Default');

echo layout(ob_get_clean(), [
    'title' => 'Site title',
]);

It is also possible to call components in a template:

$html = get_ui()
    ->addPath(__DIR__.'/templates') // Path to dir with custom templates
    ->render('page'); // page.twig in templates/ dir

echo layout($html, [
    'title' => 'Site title',
]);

page.twig

HTML code
{{ alert('Default') }}

There are multiple syntaxes available. It's up to you which one you choose.

Note: no need to use layout(), you can use own logic as well.

Requirements

  • PHP >= 8.2