Skip to content
Eskais UI

Layout

Carousel

UI SDK Carousel: native scroll-snap slides in a ScrollArea viewport with Previous and Next, arrow keys, indicators and optional rotation; CarouselStatus shows "1 of 3" and useCarouselState reads the page and count; agents page it by name.

Example

Featured projects

Apollo
Borealis
Cygnus
Draco

Installation

npx shadcn@latest add @eskais/carousel
npm packagesclass-variance-authority@0.7.1lucide-react

Usage

Import
import {  Carousel,  CarouselContent,  CarouselIndicator,  CarouselIndicatorGroup,  CarouselItem,  CarouselNext,  CarouselPlayToggle,  CarouselPrevious,  CarouselStatus,  CarouselViewport,  createCarouselController,  useCarouselState,} from "@/components/ui/carousel"

API reference

CarouselStatus

PropTypeDefault
labelsPartial<CarouselLabels>–

Also takes <p> attributes except children.

CarouselPrevious

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK CarouselPrevious.

CarouselNext

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK CarouselNext.

CarouselIndicatorGroup

Takes every prop of UI SDK CarouselIndicatorGroup.

CarouselIndicator

PropTypeDefault
label(page: number) => stringslideLabel

Also takes every prop of UI SDK CarouselIndicator.

CarouselPlayToggle

PropTypeDefault
tooltipControlTooltipOption–

Also takes every prop of UI SDK CarouselPlayToggle.

Other exports

createCarouselControlleruseCarouselStatetype CarouselIndicatorPropstype CarouselLabelstype CarouselStatusPropstype CarouselControllertype CarouselOrientationtype CarouselState

Accessibility

  • Native scroll-snap slides with Previous and Next, arrow keys and named indicators.
  • CarouselStatus shows "1 of 3" and announces it politely only when the page changes, never while rotating.

Agent actions

Agents page it with setPage, next and previous; useCarouselState() reads page and pageCount for your own header.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.