Livewire

Building a Color Picker with Livewire v4

February 01, 2026 1 min read 14 views

Build a color picker component.

Component

@php
new class extends Livewire\Component {
    public string $color = '#3b82f6';
    public array $presets = ['#ef4444', '#22c55e', '#3b82f6', '#eab308', '#8b5cf6'];
}
@endphp

@foreach($presets as $preset) @endforeach
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!