Carousel

A swipeable track of slides with previous and next buttons. Drag, swipe, or use the arrow keys while it has focus.

tsx
import {
  Carousel,
  CarouselContent,
  CarouselItem,
  CarouselPrevious,
  CarouselNext,
} from "@pestoui/core"

Peeking slides

A slide is full width unless you give it a basis-*; two-thirds leaves the next one peeking in. The buttons disable themselves at either end.

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"On Carousel. The axis the track moves along.
optsCarouselOptions—On Carousel. Passed to the underlying slider — align, loop, dragFree and the rest.
pluginsCarouselPlugin—On Carousel. Slider plugins, such as autoplay.
setApi(api: CarouselApi) => void—On Carousel. Hands back the slider API for a slide counter or external controls.
variant / sizeButton["variant"] / Button["size"]"outline" / "icon-sm"On CarouselPrevious and CarouselNext.

Pesto UI · 117 documented components