Skip to content

Carousels

The carousel components come with their own built-in script, so make sure there are no class or variable conflicts with other components. If you are only using components from this library, you shouldn’t encounter any issues.

To implement it, import the Carousel component into your Astro page or component, and wrap it in a div with your desired dimensions; the carousel size will depend on that container. Finally, edit the images and paths directly inside the Carousel component.

src/components/Projects.astro
---
// Import
import Carousel from "../components/Carousel.astro";
---
(...)
<div class="Type your container dimensions here">
<Carousel />
</div>
(...)

Adjust the time interval and image paths so the carousel runs automatically without requiring any user interaction.

First image
Second image
Third image

Add navigation controls so the user can manually move forward or backward between slides. Adjust the image paths and customize the button styles to match your project’s design.

First image
Second image
Third image

Combine manual navigation with automatic sliding for a more dynamic carousel experience. Adjust the image paths, time interval, and button styles to fit your project’s design, allowing users to navigate between slides or let the carousel play automatically.

First image
Second image
Third image

Create a seamless logo carousel with continuous scrolling to showcase brands in a clean and modern way. Adjust the speed, direction, and spacing of the logos to match your project’s design. The carousel runs automatically in an infinite loop, drawing attention without requiring user interaction, while keeping the layout lightweight and responsive.

Logo 1Logo 2Logo 3
Logo 1Logo 2Logo 3