xudid/ui

a package to generate html5 objects

Maintainers

Details

github.com/xudid/Ui

Source

Issues

Installs: 112

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Language:HTML

0.128.7 2023-04-16 14:53 UTC

This package is auto-updated.

Last update: 2025-05-27 18:41:49 UTC


README

With Xudid/Ui we can generate HTML5 from php. Each HTML5 Tag is seen as an Object .

Example

$page = X::Page()
    ->importCss('vendor/xudid/Ui/css/ui.css')
    ->importScript(
        "alert('Hello Js');",
        new Script('alert("Alert from script object")', false),
        new Script('vendor/xudid/Ui/js/modal.js'),
    )
    ->feedBody(
        X::Div(
            X::P('Hello Ui'),
            X::Form(
                x::Date()
                    ->label("Birth Date")
                    ->name('birth_date'),
                X::TextField()
                    ->label('Name')
                    ->name('name'),
                X::TextField()->label('Email')
                    ->name('email'),
                X::Submit('Submit')
                    ->addClass('btn'),
            )
        )->addClass('content')
    );

echo $page->__toString();

View more on https://xudid.github.io/