robinn / uikit
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 3
Open Issues: 0
pkg:composer/robinn/uikit
Requires
- php: >=8.2
- twig/twig: ^3.15
Requires (Dev)
- gajus/dindent: ^2.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.4
This package is auto-updated.
Last update: 2025-10-05 13:34:37 UTC
README
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.
Installation
composer require robinn/uikit
Basic Usage
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 your own logic as well.
Requirements
- PHP >= 8.2