lagdo / ui-builder-bootstrap
UI Builder extensions for the Bootstrap framework.
Requires
- lagdo/ui-builder: 0.1.*
README
Bootstrap extensions for the HTML UI builder
This package extends the HTML UI builder and implements functions to create UI components for Bootstrap 3, 4 and 5.
Usage
See the HTML UI builder documentation.
Depending on the version of Bootstrap, a different class instance must provided where the Lagdo\UiBuilder\BuilderInterface
is required.
For example, let say this View
class is used to create HTML code.
use Lagdo\UiBuilder\BuilderInterface; class View { /** * @var BuilderInterface */ protected $uiBuilder; /** * @param BuilderInterface */ public function __construct(BuilderInterface $uiBuilder) { $this->uiBuilder = $uiBuilder; } }
With the following example, the View
class will generate HTML code for Bootstrap 3.
use Lagdo\UiBuilder\Bootstrap\Bootstrap3\Builder; $view = new View(new Builder());
And with the following example, the View
class will generate HTML code for Bootstrap 4.
use Lagdo\UiBuilder\Bootstrap\Bootstrap4\Builder; $view = new View(new Builder());
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.