bebo925/tall
TALL Stack preset for Laravel with Blade components for buttons, inputs (text/checkbox/radio/textarea/rich-text/select), panels, page headings, tables, messages/notifications, and a modal layout (via wire-elements/modal). Includes an installer to set up Tailwind/Vite config.
Install the Package:
composer require bebo925/tall
php artisan tall:install
npm install).tailwind.config.js with TALL preset.webpack.mix.js (migrates to Vite).app.blade.php layout file.vite.config.js (edit host for HMR).Verify Setup:
npm install && npm run dev to compile assets.resources/views/app.blade.php for the <x-tall::messages> component (handles flash messages).First Component Usage:
<x-tall::button style="primary">Click Me</x-tall::button>
Flash Messages:
session()->flash('message', [
'type' => 'success',
'message' => 'Action completed!'
]);
<x-tall::messages> in app.blade.php.<x-tall::button>).<x-tall::input.text>, <x-tall::input.checkbox>).<x-tall::panel>) and tables (<x-tall::table>).tailwind.config.js: Customize Tailwind (e.g., colors, fonts).vite.config.js: Adjust HMR host for local development.php artisan vendor:publish --tag="tall-views"
resources/views/vendor/tall/).<x-tall::page-heading title="User Profile">
<x-slot name="actions">
<x-tall::button style="primary" wire:click="save">Save</x-tall::button>
</x-slot>
</x-tall::page-heading>
<x-tall::panel title="Edit Details">
<x-slot name="body">
<x-tall::input label="Full Name" error="name">
<x-tall::input.text wire:model.defer="name" />
</x-tall::input>
<x-tall::input label="Email" error="email">
<x-tall::input.text wire:model.defer="email" />
</x-tall::input>
</x-slot>
</x-tall::panel>
Key Features Used:
wire:model.defer).error="property_name" (assumes Laravel validation).<!-- Reusable panel with actions -->
<x-tall::panel title="Settings">
<x-slot name="body">
<x-tall::input label="Notification Email">
<x-tall::input.text wire:model.defer="email" />
</x-tall::input>
</x-slot>
<x-slot name="footer">
<x-tall::button style="primary" wire:click="update">Save</x-tall::button>
</x-slot>
</x-tall::panel>
body, footer) for flexible content placement.<x-tall::input label="Search">
<x-tall::input.text
wire:model.defer="searchQuery"
x-on:keyup.enter="$wire.search()"
/>
</x-tall::input>
x-on for Alpine events alongside Livewire directives (wire:click, wire:model).// In Livewire component
$this->dispatch('openModal', [
'component' => 'tall-confirmation-dialog',
'arguments' => [
'message' => 'Delete item?',
'title' => 'Confirm',
'style' => 'danger',
]
]);
<!-- In Blade view -->
<x-tall::modal>
<x-slot name="title">Confirm Action</x-slot>
<x-slot name="actions">
<x-tall::button style="danger" wire:click="delete">Delete</x-tall::button>
</x-slot>
</x-tall::modal>
wire-elements/modal is installed (included via tall:install).<x-tall::table>
<x-slot name="head">
<x-tall::table.heading>Name</x-tall::table.heading>
<x-tall::table.heading>Status</x-tall::table.heading>
</x-slot>
<x-slot name="body">
@foreach($users as $user)
<x-tall::table.row>
<x-tall::table.cell>{{ $user->name }}</x-tall::table.cell>
<x-tall::table.cell>
<span class="{{ $user->status === 'active' ? 'text-green-500' : 'text-red-500' }}">
{{ $user->status }}
</span>
</x-tall::table.cell>
</x-tall::table.row>
@endforeach
</x-slot>
</x-tall::table>
text-green-500).// Laravel session flash
session()->flash('message', [
'type' => 'success',
'message' => 'User created!',
]);
// Livewire dispatch
$this->dispatch('message', [
'type' => 'error',
'message' => 'Validation failed!',
]);
<x-tall::messages dark="true"></x-tall::messages>
tall-messages component.tailwind.config.js to add custom colors or fonts:
module.exports = {
presets: [require('tall-preset')],
theme: {
extend: {
colors: {
brand: '#1DA1F2', // Example custom color
},
},
},
};
purge: [] cautiously to avoid removing unused Tailwind classes.php artisan vendor:publish --tag="tall-views" --force
resources/views/vendor/tall/button.blade.php to customize button styles.vite.config.js for HMR:
export default defineConfig({
server: {
host: 'localhost', // Required for HMR
hmr: {
host: 'localhost',
},
},
});
?noCache queries in dev for faster reloads.<div>
<x-tall::page-heading title="Dashboard">
<x-slot name="actions">
<x-tall::button style="primary" wire:click="create">New Item</x-tall::button>
</x-slot>
</x-tall::page-heading>
@if ($showModal)
<x-tall::modal>
<x-slot name="title">Create Item</x-slot>
<!-- Modal content -->
</x-tall::modal>
@endif
</div>
$this->dispatch() for modal events and $this->listen() for responses.<x-tall::input label="Username" error="username">
<x-tall::input.text wire:model.defer="username" />
</x-tall::input>
public function rules() {
return ['username' => '
How can I help you explore Laravel packages today?