protonemedia / laravel-form-components

A set of Blade components to rapidly build forms with Tailwind CSS (v1.0 and v2.0) and Bootstrap 4/5. Supports validation, model binding, default values, translations, Laravel Livewire, includes default vendor styling and fully customizable!

Home Page:https://protone.media/blog/laravel-form-components-to-rapidly-build-forms-with-tailwind-css-and-bootstrap-4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Changing framework or multiple frameworks

wenfei-huang opened this issue · comments

My site uses tailwind and bootstrap. Is it possible to use multiple frameworks?

For example on bootstrap4_index.blade.php I declare to use framework bootstrap 4 and on tailwind_index.blade.php I declare to use tailwind framework.
Or using prefixes with a framework, where you can set a prefix bound to a framework? For example and

I believe tailwind and bootstrap conflict on CSS styles, I would advise against loading them both.

I've got Bootstrap on the back end, but Tailwind on the front end - is there a way to specify on a per-form basis which framework to use?

For example:

@template('tailwind');

@endtemplate

Or perhaps a @config blade directive?

Workaround

I'm not mixing and matching templates, but using different ones on different overall layouts - so as a workaround I'm able to set the framework config in my controllers as-required.

config(['form-components.framework' => 'tailwind']);

I would second what @mrl22 says - having Tailwind and Bootstrap on the same page is probably not the path to happiness!