Bootstrap 4 & 5 forms builder for Laravel 12+
bgaze/bootstrap-form is a Laravel package for bootstrap 4 & 5 forms builder for laravel 12+.
It currently has 52 GitHub stars and 54.375 downloads on Packagist (latest version v4.1.1).
Install it with composer require bgaze/bootstrap-form.
Discover more Laravel packages by bgaze
or browse all Laravel packages to compare alternatives.
Last updated
This package simplifies Bootstrap forms creation in Laravel applications, rendering all markup through its own lightweight HTML/form layer.
It renders Bootstrap 5 markup by default and fully supports Bootstrap 4 for backward compatibility.
Model form binding and automatic error display are supported, as well as most Bootstrap form features: form layouts, custom fields, input groups, and more.
Any contribution or feedback is highly welcomed, please feel free to create a pull request or submit a new issue.
v4 is functional and tested, but its full documentation is still being written.
In the meantime, the LLM usage guide shipped in this repository is the authoritative, up-to-date reference (dense but exact — usable by humans and AI assistants alike).
The full documentation site still reflects v3 and will be regenerated for v4.
v4 introduces breaking changes over v3 (see What's new below).
To keep using a previous major version, require it explicitly and refer to its dedicated branch:
| Version | Install | Docs |
|-----------------------------------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| v3 (Bootstrap 4 default, B5 opt-in) | composer require "bgaze/bootstrap-form:^3.0" | v3 branch · site |
| v2 (Bootstrap 4 only) | composer require "bgaze/bootstrap-form:^2.0" | v2 branch · site |
laravelcollective/html dependency is gone, replaced by an
internal, iso-rendering HTML/form layer owned by the package.bootstrap_version globally, per form (BF::open(['bootstrap_version' => 4])), or per field.<x-bf::text .../>) alongside the directives and the BF facade; all three render
identical markup.iterable (array, Collection, generator).datetime-local, month, week, search inputs, Bootstrap 5 floating labels, opt-in valid feedback, and accessible
aria-describedby / aria-invalid wiring.docs/llm/ (+ llms.txt).Install the package using Composer:
composer require bgaze/bootstrap-form
Several configuration options are available; publish the configuration file to customize them:
php artisan vendor:publish --provider="Bgaze\BootstrapForm\BootstrapFormServiceProvider"
Forms can be built through three interchangeable syntaxes that produce byte-identical HTML:
x-components
<x-bf::form url="/x">
<x-bf::text name="field"/>
<x-bf::submit>Save</x-bf::submit>
</x-bf::form>
Blade directives
@open(['url' => '/x'])
@text('field')
@submit('Save')
@close
BF facade
echo BF::open(['url' => '/x']);
echo BF::text('field');
echo BF::submit('Save');
echo BF::close();
Open-sourced software licensed under the MIT license.