You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
[](https://plant.treeware.earth/protonemedia/laravel-form-components)
8
8
9
-
A set of Blade components to rapidly build forms with [Tailwind CSS v1](https://tailwindcss-custom-forms.netlify.app), [Tailwind CSS v2](https://tailwindcss-forms.vercel.app) and [Bootstrap 4](https://getbootstrap.com/docs/4.0/components/forms/). Supports validation, model binding, default values, translations, includes default vendor styling and fully customizable!
9
+
A set of Blade components to rapidly build forms with [Tailwind CSS v1](https://tailwindcss-custom-forms.netlify.app), [Tailwind CSS v2](https://tailwindcss-forms.vercel.app), [Bootstrap 4](https://getbootstrap.com/docs/4.0/components/forms/) and [Bootstrap 5 Forms](https://getbootstrap.com/docs/5.1/forms/overview/). Supports validation, model binding, default values, translations, includes default vendor styling and fully customizable!
10
10
11
-
#### ... 👀 There's a Pro version of this package in development: check out [formcomponents.pro](https://formcomponents.pro)!
11
+
Looking for Inertia/Vue.js support? Check out [formcomponents.pro](https://formcomponents.pro)!
12
12
13
13
### 📺 Want to see this package in action? Join the live stream on November 19 at 14:00 CET: [https://youtu.be/7eNZS4U7xyM](https://youtu.be/7eNZS4U7xyM)
14
14
@@ -17,7 +17,8 @@ A set of Blade components to rapidly build forms with [Tailwind CSS v1](https://
17
17
* Components for input, textarea, select, multi-select, checkbox and radio elements.
18
18
* Support for Tailwind v1 with [Tailwind CSS Custom Forms](https://tailwindcss-custom-forms.netlify.app).
19
19
* Support for Tailwind v2 with [Tailwind Forms](https://tailwindcss-forms.vercel.app/).
20
-
* Support for [Bootstrap 4 Forms](https://getbootstrap.com/docs/4.0/components/forms/).
20
+
* Support for [Bootstrap 4 Forms](https://getbootstrap.com/docs/4.6/components/forms/).
21
+
* Support for [Bootstrap 5 Forms](https://getbootstrap.com/docs/5.1/forms/overview/).
21
22
* Component logic independent from Blade views, the Tailwind and Bootstrap views use the same logic.
22
23
* Bind a target to a form (or a set of elements) to provide default values (model binding).
23
24
* Support for [Laravel Livewire](https://laravel-livewire.com) v2.
@@ -75,7 +76,7 @@ If you're using Tailwind, make sure the right plugin ([v1](https://github.com/ta
@@ -406,29 +407,31 @@ By the default, the errors messages are positioned under the element. To show th
406
407
407
408
### Submit button
408
409
409
-
The label defaults to *Submit* but you can use the slot to provide your own content.
410
+
The label defaults to *Submit*, but you can use the slot to provide your own content.
410
411
411
412
```blade
412
413
<x-form-submit>
413
414
<span class="text-green-500">Send</span>
414
415
</x-form-submit>
415
416
```
416
417
417
-
### Bootstrap 4
418
+
### Bootstrap
418
419
419
-
You can switch to [Bootstrap 4](https://getbootstrap.com/docs/4.0/components/forms/) by updating the `framework` setting in the `form-components.php` configuration file.
420
+
You can switch to [Bootstrap 4](https://getbootstrap.com/docs/4.0/components/forms/)or [Bootstrap 5](https://getbootstrap.com/docs/5.0/forms/overview/)by updating the `framework` setting in the `form-components.php` configuration file.
420
421
421
422
```php
422
423
return [
423
-
'framework' => 'bootstrap-4',
424
+
'framework' => 'bootstrap-5',
424
425
];
425
426
```
426
427
427
-
There is a little bit of styling added to the `form.blade.php` view to add support for inline form groups. If you want to change it or remove it, [publish the assets](#customize-the-blade-views) and update the view file.
428
+
There is a little of styling added to the `form.blade.php` view to add support for inline form groups. If you want to change it or remove it, [publish the assets](#customize-the-blade-views) and update the view file.
429
+
430
+
Bootstrap 5 changes a lot regarding forms. If you migrate from 4 to 5, make sure to read the migration logs about [forms](https://getbootstrap.com/docs/5.0/migration/#forms).
428
431
429
-
#### Input prepend and append
432
+
#### Input group / prepend and append
430
433
431
-
In addition to the Tailwind features, there is also support for [input groups](https://getbootstrap.com/docs/4.1/components/forms/#auto-sizing). Use the `prepend` and `append` slots to provide the contents.
434
+
In addition to the Tailwind features, with Bootstrap 4, there is also support for [input groups](https://getbootstrap.com/docs/4.6/components/forms/). Use the `prepend` and `append` slots to provide the contents.
432
435
433
436
```blade
434
437
<x-form-input name="username" label="Username">
@@ -444,9 +447,28 @@ In addition to the Tailwind features, there is also support for [input groups](h
444
447
</x-form-input>
445
448
```
446
449
450
+
With Bootstrap 5, the [input groups](https://getbootstrap.com/docs/5.0/forms/input-group/) have been simplified. You can add as many items as you would like in any order you would like. Use the `form-input-group-text` component to add text or [checkboxes](https://getbootstrap.com/docs/5.0/forms/input-group/#checkboxes-and-radios).
As of Bootstrap 5, you can add [floating labels](https://getbootstrap.com/docs/5.0/forms/floating-labels/) by adding the `floating` attribute to inputs, selects (excluding `multiple`), and textareas.
0 commit comments