jpmurray / gonewiththewind
A package containing Tailwind CSS components that plays well with the default Laravel Tailwind UI.
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jpmurray/gonewiththewind
Requires
- laravel/framework: ^8.12
README
Packages that provides (what I think is) blade components that plays well with the basic Tailwind UI offered by Laravel (in Breeze, for example).
This was made in an effort to try and learn Tailwind. Not that I want to learn it, mind you, I'd still prefer to be using Bootstrap out of the box! But I'm a prototyper, and it seems I have to take a small time in my schedule so I can go with the wind of what's now offered by default in Laravel.
Components and usage
Cards components
Table
<x-with-wind-cards::table model="user" :data="$users" :show="['name']" :actions="['edit']" />
Attributes:
modelasks for the singular model name to generates things like routes (ex: `route('users.index'))dataasks for the data to display in table, goes well with an eloquent collection or a paginated collection.showasks what column to show from the data (ex:['name', 'created_at'])actionsdefaults to null, but if provided, will add anactioncolumn with specified ones. For now, supports['edit', 'delete']
Forms components
Label
<x-with-wind-forms::label for="name">Name</<x-with-wind-forms::label>
Input
<x-with-wind-forms::input id="name" type="text" name="name" :value="old('name')" required />
Select
<x-with-wind-forms::select id="type" name="type" autocomplete="type" :choices="['Label' => 'value']" chosen="value" />
Attributes:
choicesasks for an associative array oflabel => valueto populate the select elementchosenasks for what should be selected in the choices, if necessary.
Submit button
<x-with-wind-forms::submit>Save</<x-with-wind-forms::submit>