Installation
npx shadcn@latest add @iconiq/carouselProps
Carousel
Root carousel region wired to Embla. Provides context for content, items, and navigation controls plus ArrowLeft and ArrowRight keyboard handling.
orientation"horizontal" | "vertical"Default horizontal
aspectRatio"square" | "video" | "4/3" | "3/2" | "portrait" | stringDefault video
optsEmblaCarouselOptionspluginsEmblaCarouselPluginType[]setApi(api: CarouselApi) => voidclassNamestringInstall path is `components/ui/carousel.tsx`. Exports include `Carousel`, `CarouselContent`, `CarouselItem`, `CarouselPrevious`, `CarouselNext`, `useCarousel`, and `CarouselApi`.
Previous and next buttons are absolutely positioned outside the track (`-left-12` / `-right-12` horizontally). Leave horizontal padding in your preview or page layout so controls stay visible.
Requires the Iconiq `button` primitive (or your own `Button` at `@/components/ui/button`) for the navigation controls.
CarouselContent
Overflow-hidden viewport that hosts the Embla ref and the flex track of slides.
classNamestringCarouselItem
Single slide wrapper sized to `basis-full` with directional padding between siblings.
classNamestringCarouselPrevious / CarouselNext
Outline icon buttons that call `scrollPrev` and `scrollNext` and disable when Embla cannot scroll further.
variantButton variantDefault outline
sizeButton sizeDefault icon
classNamestringRegistry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: embla-carousel-react, lucide-react.