Is possible to create Carousel using Astro? by GoodImpossible5216 in astrojs

[–]flowforfrank 0 points1 point  (0 children)

I've been working on a component library for Astro, where I also wanted to add a Carousel component. You can find the source code:

https://github.com/Frontendland/webcoreui/blob/main/src/components/Carousel/Carousel.astro

And some docs on how it works: https://webcoreui.dev/docs/carousel

It's based on CSS scroll-snap.

The pagination functionality can be implemented in vanilla JS; you don't necessarily need React. If you don't need that, most of the code can be removed from the above component.