ComponentClient component

Carousel

An accessible touch and keyboard-friendly carousel powered by Embla.

Installation

Preview

01

Foundations

Editable pieces, composed with Rivelle.

02

Components

Editable pieces, composed with Rivelle.

03

Blocks

Editable pieces, composed with Rivelle.

Usage

tsx
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"

<Carousel>
  <CarouselContent>
    {[1, 2, 3].map((slide) => (
      <CarouselItem key={slide}>Slide {slide}</CarouselItem>
    ))}
  </CarouselContent>
  <CarouselPrevious />
  <CarouselNext />
</Carousel>

API reference

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Controls the scroll axis.
optsCarouselOptionsEmbla behavior and alignment options.
setApi(api: CarouselApi) => voidExposes the Embla API for advanced control.
classNamestringOverrides or extends the generated Tailwind classes.
disabledbooleanfalsePrevents user interaction when supported.