Carousel

A carousel component for cycling through elements with sliding animations.

Installation

$npx maddex add Carousel

Basic

Start with the default composition: Carousel, CarouselContent, CarouselItem, and the built-in navigation buttons.

Preview

        
            
        
    

Sizes

Use basis utilities on CarouselItem and spacing utilities on CarouselContent to control how many slides are visible at each breakpoint.

Preview

        
            
        
    

API

Pass set-api to read the active slide and total slide count from the live carousel instance.

Preview