datalogix/tallkit
TALLKit provides a set of anonymous Blade components for the TALL stack (Tailwind, Alpine.js, Laravel, Livewire). Use tags like tk:button and tk:alert to build UI quickly, with JS and CSS assets included for your Tailwind build.
Installation
composer require datalogix/tallkit
Pin to ^0.1.1 or later — this release fixes component retrieval inside the modal and toast helpers, so earlier patch versions can silently render the wrong component (or nothing) when using those methods.
composer require datalogix/tallkit:^0.1.1
Publish the package assets (if needed)
php artisan vendor:publish --provider="Datalogix\Tallkit\TallkitServiceProvider" --tag="public"
First Use Case: Basic Button Include the package in your Blade view:
@use('Datalogix\Tallkit\Components\Button')
Render a button:
<x-button type="primary">Click Me</x-button>
Where to Look First
vendor/datalogix/tallkit/src/Components/ for available components (e.g., Button.php, Alert.php).@use or <x-component>.modal/toast retrieval path is worth verifying in your own app after upgrading.Component Integration
autocomplete or command with dynamic data:
<x-autocomplete :items="$dynamicItems" placeholder="Search..." />
button with variants:
<x-button type="danger" outline>Delete</x-button>
Form Fields
field wrapper for consistent styling:
<x-field label="Username">
<x-input name="username" />
</x-field>
toggle, slider, or upload:
<x-toggle name="active" label="Enable Feature" />
Layout Components
header or build a nav with active states:
<x-header title="Dashboard" subtitle="Welcome back" />
paginator with per-page select:
<x-paginator :items="$posts" per-page-options="[5, 10, 20]" />
Advanced Features
<x-editor :content="$post->content" />
date-picker or color-picker:
<x-date-picker name="event_date" />
Programmatic Modal and Toast
modal and toast are the two helpers that resolve a component at call time. This is exactly the code path fixed in v0.1.1, so treat them as the first thing to smoke-test after upgrading.use function Datalogix\Tallkit\toast;
public function save()
{
$this->post->save();
toast()
->success('Post saved.')
->duration(4000);
}
use function Datalogix\Tallkit\modal;
modal()
->component('post-edit', ['post' => $post])
->open();
Event Handling
autocomplete:selected). Listen via Alpine.js:
<x-autocomplete @selected="handleSelection" />
<script>
document.addEventListener('autocomplete:selected', (e) => {
console.log(e.detail);
});
</script>
Stale Modal/Toast Rendering (pre-0.1.1)
0.1.0 or below and see modals or toasts displaying the wrong content — or an empty body — the cause is component retrieval inside modal() / toast(), not your component markup. Upgrade to ^0.1.1 before debugging your own views.php artisan view:clear
Dynamic Loading
autocomplete or command, ensure data is fetched via AJAX to avoid initial load delays:
<x-autocomplete :items="[]">
@push('scripts')
<script>
document.querySelector('x-autocomplete').addEventListener('search', (e) => {
fetch(`/api/search?q=${e.detail.query}`)
.then(res => res.json())
.then(items => {
document.querySelector('x-autocomplete').items = items;
});
});
</script>
@endpush
</x-autocomplete>
Styling Conflicts
tailwind.config.js or scoped classes:
/* Example: Override button padding */
.tallkit-button {
@apply py-3 px-4;
}
Missing Dependencies
toggle, slider) require Alpine.js. Include it in your layout:
@vite(['resources/js/app.js', 'resources/js/alpine.js'])
x-data boot looks identical to a component retrieval failure. Rule out Alpine first.Component Registration
AppServiceProvider:
Tallkit::registerComponents();
modal()->component('...') must be registered through the same channel, or retrieval returns nothing.Inspect Blade Output
@dd() to debug component props:
@dd(\Datalogix\Tallkit\Components\Button::class)
Check for Errors
APP_DEBUG=true) and check logs for missing views or props.Isolate Modal/Toast Failures
composer show datalogix/tallkit
Component Isolation
Custom Components
namespace App\Components;
use Datalogix\Tallkit\Components\Button;
class CustomButton extends Button {
public function customMethod() { ... }
}
AppServiceProvider:
Tallkit::extend('custom-button', CustomButton::class);
modal() and toast() — verify after upgrading, since retrieval semantics changed.Adding New Variants
resources/views/vendor/tallkit/:
<!-- resources/views/vendor/tallkit/button.blade.php -->
@props(['type' => 'primary'])
<button class="bg-{{ $type }}-500 ...">...</button>
JavaScript Enhancements
<x-upload @uploaded="console.log('Uploaded!')" />
Configuration
php artisan vendor:publish --tag="tallkit-config"
config/tallkit.php.How can I help you explore Laravel packages today?