beartropy/ui
Beartropy UI is a small Laravel UI package providing ready-made components and helpers to speed up building admin and front-end screens. Drop in common layouts, forms, and UI utilities to get a consistent look fast with minimal setup.
A time selection input with a wheel-style dropdown, 12/24-hour format, seconds support, min/max range, minute intervals, and color presets.
<x-bt-time-picker label="Meeting Time" wire:model="time" />
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string|null |
null |
Label text above the input |
placeholder |
string|null |
null |
Placeholder text (defaults to "Select time...") |
value |
mixed |
null |
Initial value in HH:mm or HH:mm:ss format |
format |
string |
'H:i' |
Time format. H:i = 24-hour, h:i A = 12-hour with AM/PM |
color |
string|null |
config default | Color preset name |
id |
string|null |
auto-generated | Component id |
name |
string|null |
falls back to id | Input name for form submission |
min |
string|null |
null |
Minimum allowed time (HH:mm format) |
max |
string|null |
null |
Maximum allowed time (HH:mm format) |
interval |
int |
1 |
Minute step: 1, 5, 10, 15, 30, 60 |
seconds |
bool |
false |
Show seconds wheel |
disabled |
bool |
false |
Disables interaction |
clearable |
bool |
true |
Show clear button when a value is selected |
custom-error |
mixed |
null |
Custom error message (bypasses validation bag) |
help |
string|null |
null |
Help text below the input |
hint |
string|null |
null |
Alias for help |
{{-- Default color --}}
<x-bt-time-picker label="Default" />
{{-- Explicit color prop --}}
<x-bt-time-picker label="Blue" color="blue" />
{{-- Magic attribute shorthand --}}
<x-bt-time-picker label="Rose" rose />
{{-- Dynamic color --}}
<x-bt-time-picker :color="$hasError ? 'red' : 'primary'" label="Appointment" />
All 24 colors + primary: primary, beartropy, red, blue, green, yellow, purple, pink, gray, orange, amber, lime, emerald, teal, cyan, sky, indigo, violet, rose, fuchsia, slate, stone, zinc, neutral.
Use format="h:i A" for 12-hour mode with AM/PM toggle buttons. The stored value is always in 24-hour format.
<x-bt-time-picker label="12h Format" format="h:i A" wire:model="time" />
Enable the seconds wheel with :seconds="true". The value format becomes HH:mm:ss.
<x-bt-time-picker label="Precise Time" :seconds="true" wire:model="time" />
Combine with 12-hour mode:
<x-bt-time-picker label="Full" format="h:i A" :seconds="true" value="02:30:15" />
Restrict selectable times. Hours and minutes outside the range are disabled in the wheel.
<x-bt-time-picker label="Business Hours" min="08:00" max="17:30" />
Only show minutes that are multiples of the interval.
{{-- 15-minute slots: 00, 15, 30, 45 --}}
<x-bt-time-picker label="Quarter Hour" :interval="15" />
{{-- 30-minute slots: 00, 30 --}}
<x-bt-time-picker label="Half Hour" :interval="30" />
{{-- Combine with range --}}
<x-bt-time-picker label="Appointments" :interval="30" min="09:00" max="16:00" />
<x-bt-time-picker label="Locked" :disabled="true" value="10:00" />
Clear button is shown by default when a value is selected. Disable with :clearable="false".
<x-bt-time-picker label="Clearable" wire:model="time" />
<x-bt-time-picker label="Not Clearable" :clearable="false" value="09:00" />
<x-bt-time-picker label="Check-in" custom-error="Please select a valid time." />
Errors are automatically detected from the Laravel $errors bag using the wire:model name.
<x-bt-time-picker label="Time" help="Choose your preferred time." />
<x-bt-time-picker label="Time" hint="Format: HH:mm (24-hour)" />
{{-- Vanilla form --}}
<x-bt-time-picker label="Start" value="14:30" name="start_time" />
{{-- Livewire --}}
<x-bt-time-picker label="Start" wire:model="startTime" />
{{-- Deferred (default) --}}
<x-bt-time-picker label="Time" wire:model="time" />
{{-- Real-time --}}
<x-bt-time-picker label="Time" wire:model.live="time" />
{{-- On blur --}}
<x-bt-time-picker label="Time" wire:model.blur="time" />
The dropdown uses a wheel-style selector:
<x-bt-time-picker
label="Appointment"
format="h:i A"
:seconds="true"
:interval="15"
min="08:00"
max="18:00"
color="emerald"
value="10:00"
help="Business hours only, 15-minute slots."
wire:model="appointmentTime"
/>
In config/beartropyui.php:
'component_defaults' => [
'time-picker' => [
'color' => env('BEARTROPY_UI_TIME_PICKER_COLOR', 'beartropy'),
],
],
Dark mode is fully supported automatically via dark: Tailwind variants.
How can I help you explore Laravel packages today?