leafsphp / leaf-ui

Leaf UI is a PHP library for building user interfaces.

Home Page:https://ui.leafphp.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Leaf UI

Leaf UI is a PHP library for building user interfaces.

Leaf UI simply takes away the 100s of lines of crazy HTML you'd need to write, so you can focus on only PHP. Leaf UI doesn't need a new compiler or any extensive compiling, it's just the same old PHP you write everyday; as such, you can build full scaleable Leaf UI powered apps or just sprinkle Leaf UI into your existing HTML/PHP code.

Installing Leaf UI

Like most PHP libraries, we recommend installing Leaf UI with composer. Just open up your console and type:

composer require leafs/ui

This will install Leaf UI into your application. You don't have to worry about bloating your application: Leaf UI has no external dependencies.

After this, you can use all of Leaf UI's methods and components.

View the mini documentation here

Working with Leaf UI

What does leaf UI offer you?

Instead of this:

<?php
// all your logic

echo "<section class=\"box\">
  <h2 class=\"box-title\">Item name</h2>
  <p class=\"box-body\">
    Your body here
  </p>
</section>";
?>

You get to write this:

<?php
// all your logic

echo section(["class" => "box"], [
  h2("Item name"),
  p("Your body here")
]);
?>

In the end, leaf ui allows you to write your whole app peacefully without having to deal with weird strings, interpollation and all that. Just write PHP!

This file is still being updated!

💬 Stay In Touch

📓 Learning Leaf 3

  • Leaf has a very easy to understand documentation which contains information on all operations in Leaf.
  • You can also check out our youtube channel which has video tutorials on different topics
  • We are also working on codelabs which will bring hands-on tutorials you can follow and contribute to.

😇 Contributing

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.

Code contributors


Michael Darko

🤩 Sponsoring Leaf

Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on open collective or check the contribution page for a list of ways to contribute.

And to all our existing cash/code contributors, we love you all ❤️

Cash contributors


Aaron Smith

Peter Bogner

Vano

🤯 Links/Projects

About

Leaf UI is a PHP library for building user interfaces.

https://ui.leafphp.dev/


Languages

Language:PHP 100.0%