Beta modeInstall commands on this page use
lvcn@beta, which installs from the beta registry and may change before the stable release.What’s in betaLoading preview…
Carousel is in beta. This component was recently added and will be stabled soon.
Installation
npx lvcn-ui@latest add carouselRegistry dependencies: semantic-icon, icon, primitives, utils
Usage
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"
import { Text, View } from "react-native"
export function Example() {
const data = ["Slide 1", "Slide 2", "Slide 3"];
return (
<Carousel>
<CarouselContent
data={data}
renderItem={({ item }) => (
<CarouselItem className="h-40 bg-muted">
<Text>{item}</Text>
</CarouselItem>
)}
/>
<CarouselPrevious />
<CarouselNext />
</Carousel>
)
}