Carousel
A carousel with swipe support, built on `embla-carousel-react`.
A carousel with swipe support, built on embla-carousel-react.
1
2
3
4
tsx
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious,} from "@celestia-project/ui/primitive/carousel"
<Carousel opts={{ loop: true }} className="w-64"> <CarouselContent> <CarouselItem>1</CarouselItem> <CarouselItem>2</CarouselItem> <CarouselItem>3</CarouselItem> </CarouselContent> <CarouselPrevious /> <CarouselNext /></Carousel>Pass embla options via opts and access the API with the useCarousel hook or the setApi prop.