7
GitHub - RobiNN1/PHP-UI-Kit: A toolkit for developing universal web interfaces w...
source link: https://github.com/RobiNN1/PHP-UI-Kit
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PHP UI Kit
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.
Installation
composer require robinn/uikit
Basic Usage
Simply print everything with echo.
ob_start();
echo 'HTML code';
echo alert('Default');
$body = ob_get_clean();
echo layout($body, [
'title' => 'Site title',
]);
It is also possible to call components in a template:
get_ui()->setPath(__DIR__.'/templates'); // Path to dir with custom templates
$html = get_ui()->render('page'); // page.twig in templates/ dir
echo layout($html, [
'title' => 'Site title',
]);
page.twig
HTML code
{{ alert('Default') }}
Requirements
- PHP >= 8.1
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK