@props([ 'name' => null, 'label' => null, 'checked' => false, 'disabled' => false, 'size' => 'md', 'variant' => 'primary', 'description' => null, 'required' => false, ]) @php $id = $attributes->get('id') ?? $name ?? 'toggle-' . uniqid(); // Flowbite sizes $sizes = match($size) { 'sm' => 'w-9 h-5 after:h-4 after:w-4', 'lg' => 'w-14 h-7 after:h-6 after:w-6', default => 'w-11 h-6 after:h-5 after:w-5', }; // Color variants $colors = match($variant) { 'primary' => 'peer-checked:bg-blue-600', 'secondary' => 'peer-checked:bg-gray-600', 'success' => 'peer-checked:bg-green-600', 'warning' => 'peer-checked:bg-yellow-600', 'danger' => 'peer-checked:bg-red-600', default => 'peer-checked:bg-blue-600', }; @endphp
only(['class', 'x-data', 'x-show']) }}> @if($label || $description)
@if($label) @endif @if($description)

{{ $description }}

@endif
@endif