View laravel-hotwire on GitHub
1M
v0.91.0
Search 71 components and 72 controllers by name, category or description.
Carousel
Embla carousel with responsive options, navigation, dots, progress and slide counter
Basic
<hw:carousel class="relative" loop :dots="false">
@foreach ($photos as $photo)
<div class="min-w-0 overflow-hidden">
<img src="{{ $photo['url'] }}" alt="" class="h-80 w-full rounded-md object-cover" />
</div>
@endforeach
<x-slot:prev_button
class="absolute left-3 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/30 bg-black/35 text-white shadow-sm backdrop-blur-sm transition hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-40"
aria-label="Previous slide"
>
<x-lucide-chevron-left class="size-5" />
</x-slot:prev_button>
<x-slot:next_button
class="absolute right-3 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/30 bg-black/35 text-white shadow-sm backdrop-blur-sm transition hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-40"
aria-label="Next slide"
>
<x-lucide-chevron-right class="size-5" />
</x-slot:next_button>
</hw:carousel>
Sized slides with dots
<hw:carousel
class="relative"
slide-size="80%"
slide-spacing="1rem"
dot-list-class="absolute bottom-3 left-1/2 flex -translate-x-1/2 gap-1.5"
loop
>
@foreach ($photos as $photo)
<div class="min-w-0 overflow-hidden">
<img src="{{ $photo['url'] }}" alt="" class="h-80 w-full rounded-md object-cover" />
</div>
@endforeach
<x-slot:prev_button
class="absolute left-3 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/30 bg-black/35 text-white shadow-sm backdrop-blur-sm transition hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-40"
aria-label="Previous slide"
>
<x-lucide-chevron-left class="size-5" />
</x-slot:prev_button>
<x-slot:next_button
class="absolute right-3 top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full border border-white/30 bg-black/35 text-white shadow-sm backdrop-blur-sm transition hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-40"
aria-label="Next slide"
>
<x-lucide-chevron-right class="size-5" />
</x-slot:next_button>
<x-slot:dot_template class="size-2.5 rounded-full bg-white/50 transition-colors aria-current:bg-white"></x-slot:dot_template>
</hw:carousel>
Vertical
<hw:carousel
class="relative"
viewport-class="h-96"
container-class="flex-col"
slide-size="100%"
axis="y"
:navigation="false"
loop
>
@foreach ($photos as $photo)
<div class="min-h-0 overflow-hidden">
<img src="{{ $photo['url'] }}" alt="" class="h-full w-full rounded-md object-cover" />
</div>
@endforeach
</hw:carousel>