Docs
Loading Carousel

Loading Carousel

An animated carousel component with loading indicators and customizable display options.

Installation

npx shadcn@latest add https://cult-ui.com/r/loading-carousel.json

Usage

import { LoadingCarousel } from "@/components/ui/loading-carousel"
export default function LoadingCarouselDemo() {
  return <LoadingCarousel />
}

Props

PropTypeDefaultDescription
tipsTip[]defaultTipsArray of tips to display in the carousel
autoplayIntervalnumber4000Time in milliseconds between slides
showNavigationbooleanfalseShow previous/next navigation buttons
showIndicatorsbooleantrueShow slide indicator dots
showProgressbooleantrueShow progress bar for current slide
aspectRatio"video" | "square" | "wide""video"Aspect ratio of the carousel
textPosition"top" | "bottom""bottom"Position of the tip text
onTipChange(index: number) => void-Callback function when tip changes
backgroundTipsbooleanfalseShow tips on the image background
backgroundGradientbooleanfalseShow gradient overlay on background
shuffleTipsbooleanfalseRandomly shuffle the order of tips

Examples

Default

<LoadingCarousel />

Custom Interval and Navigation

<LoadingCarousel autoplayInterval={2000} showNavigation={true} />

Square Aspect Ratio with Background Tips

<LoadingCarousel
  aspectRatio="square"
  backgroundTips={true}
  backgroundGradient={true}
/>

Wide Aspect Ratio with Top Text

<LoadingCarousel aspectRatio="wide" textPosition="top" showIndicators={false} />

Shuffled Tips

<LoadingCarousel
  shuffleTips={true}
  autoplayInterval={3000}
  showProgress={false}
/>