🧩 Components
🧩 TomSelect Component
This component replaces Select2.js with a vanilla JS alternative, so it does not depend on jQuery.
Basic Usage in Blade
<x-hwkui-tom-select
class="h-full"
wire:model="customer_id"
label="Customer"
placeholder="Select customer...">
<!-- Default empty option -->
<option value="">Select Customer...</option>
<!-- Dynamic options -->
@foreach ($customers as $c)
<option value="{{ (string) $c->id }}" wire:key="{{ $c->id }}">
{{ $c->name }}
</option>
@endforeach
</x-hwkui-tom-select>
Passing Additional TomSelect Options
You can pass extra options via the :options attribute:
<x-hwkui-tom-select
wire:model="customer_id"
label="Customer"
:options="[
'maxItems' => 3,
'create' => true,
'plugins' => ['remove_button']
]">
</x-hwkui-tom-select>
More information about TomSelect setup can be found at the official website Tom Select
🧩 Select2 Component
In your Blade view:
<x-hwkui-select wire:model="selectedItem" label="Select User to PLay" placeholder="Select a user Babe">
@forelse ($users as $user)
<option wire:key="{{ $user->id }}" value="{{ $user->name }}">{{ $user->name }}</option>
@empty
<option value="">No options available</option>
@endforelse
</x-hwkui-select>
you can pass options for Select2 like via component
<x-hwkui-select
wire:model="selectedUser"
label="Choose User"
:options="$options"
>
</x-hwkui-select>
or direct array
<x-hwkui-select
wire:model="selectedUser"
label="Choose User"
:options="[
'placeholder' => 'Select an option',
'allowClear' => true,
'multiple' => true,
]"
>
</x-hwkui-select>
🧩 DateTime Picker Component
This component provides an elegant datetime picker powered by Tempus Dominus v6, ready to use in your Laravel Livewire app with a clean, customizable Blade syntax.
Enable in Configuration
in your blade use it like this
Basic Usage
<x-hwkui-datetime id="test-datetime" label="Test DateTime"
placeholder="Select Date" wire:model="setDatetime" />
You can configure default picker options globally in config/hwkui.php
You can explore all available options on the Options page and see what you can add.
Override Options Per Component
yOverride settings for individual instances using the :options attribute:
<x-hwkui-datetime id="test-datetime" :options="[
'display' => [
'components' => [
'date' => false,
'year' => true,
'month' => true,
'clock' => false,
],
],
'localization' => [
'format' => 'yyyy-MM h:i:s',
'locale' => app()->getLocale(),
],
]" class="border-amber-500" label="Test DateTime"
placeholder="Select Date" wire:model="setDatetime" />
🧩 Text Editor Component
A rich-text editor component powered by Quill.js, built for Laravel Livewire 3. Fully supports customization, toolbar control, themes, and Livewire model binding.
In your config/hwkui.php, activate the editor plugin:
| hwkui.php | |
|---|---|
Basic Usage
Toolbar Customization
Use the toolbar attribute to define your desired tools.
<x-hwkui-editor id="editor"
wire:model.live="content"
theme="snow"
toolbar="bold|italic|underline|link|image|code-block|blockquote|list|clean">
</x-hwkui-editor>