Oros UI

Search documentation

Search Oros UI pages and components.

Carousel

Presents a sequence of content in a scrollable viewport.

1
2
3
4
5

Installation

Install Carousel from Oros with shadcn CLI 4.13.0.

pnpm dlx shadcn@4.13.0 add @oros/carousel

Usage

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

Open the Source tab in the preview for a complete working example.

Anatomy

ExportResponsibility
CarouselApiThe root component that owns the primary structure and state.
CarouselA composable part of the component anatomy.
CarouselContentContains the primary visible content.
CarouselItemRepresents one option or repeated child.
CarouselPreviousA composable part of the component anatomy.
CarouselNextA composable part of the component anatomy.
useCarouselReads or controls the component's shared state.

API Reference

Carousel exports 7 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.

  • CarouselApi Component
  • Carousel Component
  • CarouselContent Component
  • CarouselItem Component
  • CarouselPrevious Component
  • CarouselNext Component
  • useCarousel Hook

Accessibility

  • Preserve the native and Base UI keyboard model when composing Carousel; do not replace semantic links or controls with click-only elements.
  • Use concise accessible names, expose the current item when applicable, and verify focus order at both mobile and desktop widths.

Source

Carousel uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.