Components

Carousel

A shadcn-style card carousel with swipeable slides and external next or previous controls.

Tap to show a QR code for the Expo showcase deep link. The web preview below runs in the browser.

Loading...

Installation

Install the registry item directly, then add any package dependencies if you are setting the component up manually.

1

Install the component

Run the registry command below to add carousel to your project.

watermelon add carousel
2

Import the component

Import Carousel from your local UI registry output.

Import

import { Carousel } from "@/components/ui/carousel";

Import

Import

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

Usage

Carousels work well for swipeable feature cards, onboarding steps, and compact content rails that still need clear external controls.

Loading...

API Reference

proptypedefaultdescription
defaultIndex / indexnumber0Sets the active slide in uncontrolled or controlled mode.
loopbooleanfalseWhen true, next and previous controls wrap around the slide list.
onIndexChange(index: number) => void-Called whenever the active slide changes.