https://github.com/robinn1/php-ui-kit
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.
https://github.com/robinn1/php-ui-kit
bootstrap css fomantic-ui framework kit php php-ui-kit semantic-ui templating twig ui uikit
Last synced: 2 months ago
JSON representation
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.
- Host: GitHub
- URL: https://github.com/robinn1/php-ui-kit
- Owner: RobiNN1
- License: mit
- Created: 2022-02-04T20:28:33.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T21:52:03.000Z (7 months ago)
- Last Synced: 2025-03-24T05:03:51.020Z (3 months ago)
- Topics: bootstrap, css, fomantic-ui, framework, kit, php, php-ui-kit, semantic-ui, templating, twig, ui, uikit
- Language: PHP
- Homepage:
- Size: 2.44 MB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP UI Kit
A toolkit for developing universal web interfaces with support for multiple CSS frameworks.

## Installation
```
composer require robinn/uikit
```## Basic Usage
Print everything with echo.
```php
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:
```php
$html = get_ui()
->addPath(__DIR__.'/templates') // Path to dir with custom templates
->render('page'); // page.twig in templates/ direcho layout($html, [
'title' => 'Site title',
]);
````page.twig`
```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