<div class="carousel carousel-center max-w-md p-4 space-x-4 bg-neutral rounded-box">
<div class="carousel-item"> <img src="https://picsum.photos/id/400/250/180" class="rounded-box" alt="" /></div>
<div class="carousel-item"> <img src="https://picsum.photos/id/401/250/180" class="rounded-box" alt="" /></div>
<div class="carousel-item"> <img src="https://picsum.photos/id/402/250/180" class="rounded-box" alt="" /></div>
<div class="carousel-item"> <img src="https://picsum.photos/id/403/250/180" class="rounded-box" alt="" /></div>
</div>
@jrmc.carousel({ class: 'carousel-center max-w-md p-4 space-x-4 bg-neutral rounded-box' })
@jrmc.carousel.item()
<img src="https://picsum.photos/id/400/250/180" class="rounded-box" alt="" />
@end
@jrmc.carousel.item()
<img src="https://picsum.photos/id/401/250/180" class="rounded-box" alt="" />
@end
@jrmc.carousel.item()
<img src="https://picsum.photos/id/402/250/180" class="rounded-box" alt="" />
@end
@jrmc.carousel.item()
<img src="https://picsum.photos/id/403/250/180" class="rounded-box" alt="" />
@end
@end
Doc : daisyui carousel
Carousel show images or content in a scrollable area.
Class name | Type | |
---|---|---|
carousel | Component | Container element |
carousel-item | Component | Carousel item |
carousel-center | Modifier | Snap elements to center |
carousel-end | Modifier | Snap elements to end |
carousel-vertical | Responsive | Vertical carousel |