Loading component…
Components /Perspective Carousel
Spring-driven 3D image carousel
Run the following command
npx shadcn@latest add https://raw.githubusercontent.com/Ashutoshx7/VengeanceUI/main/public/r/perspective-carousel.json| Prop Name | Type | Default | Description |
|---|---|---|---|
| items | PerspectiveCarouselItem[] | - | Slides with src, title, and optional alt values. |
| activeIndex | number | - | Controlled active slide index. |
| defaultActiveIndex | number | 0 | Initial slide index for uncontrolled usage. |
| onActiveIndexChange | (index: number) => void | - | Called whenever a slide is selected. |
| loop | boolean | false | Wraps previous and next navigation at the ends. |
| slideWidth | number | 200 | Width of each image card in pixels. |
| rotationStep | number | 60 | Y-axis rotation difference between adjacent slides. |
| inactiveScale | number | 0.85 | Scale applied to inactive slides. |
| transition | Transition | spring | Framer Motion transition used for carousel movement. |
| showControls | boolean | true | Shows the bottom navigation control bar. |
| showDots | boolean | true | Shows slide position dots inside the controls. |
| className | string | - | Additional classes for the carousel root. |
| viewportClassName | string | - | Additional classes for the clipped viewport. |
| slideClassName | string | - | Additional classes for each animated slide. |
| imageClassName | string | - | Additional classes for each image. |
| labelClassName | string | - | Additional classes for the active slide title. |
| controlsClassName | string | - | Additional classes for the navigation controls. |