Gradient Carousel

gradient-carousel-tw
Carousel item 1
Carousel item 2
Carousel item 3
Carousel item 4
Carousel item 5
Carousel item 6
Carousel item 7
Carousel item 8

Customize

28
200
0.85
15
0.95
0.75
1
24
1
0.25
1
0

Props

NameTypeDefaultDescription
imagesstring[]["https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&q=80", ...]Array of image URLs to display in the carousel. The component will extract dominant colors from each image to create dynamic gradient backgrounds.
classNamestring""Additional CSS classes for the wrapper container. Use this to customize the carousel's appearance.
maxRotationDegreesnumber28Maximum rotation angle for cards in degrees. Controls how much cards rotate as they move away from center.
maxDepthPxnumber140Maximum depth on the Z-axis in pixels. Controls how far cards move back in 3D space as they move away from center.
minScalenumber0.92Minimum scale factor for cards (0-1). Cards will scale down to this value as they move away from center.
cardGapnumber28Gap between cards in pixels. Controls the spacing between adjacent cards in the carousel.
frictionFactornumber0.9Velocity decay factor (0-1). Lower values create more friction and slower deceleration. Range: 0.5 to 0.99.
wheelSensitivitynumber0.6Mouse wheel sensitivity multiplier. Higher values make wheel scrolling more responsive. Range: 0.1 to 2.0.
dragSensitivitynumber1.0Drag sensitivity multiplier. Higher values make dragging more responsive. Range: 0.5 to 2.0.
backgroundBlurnumber24Blur intensity for background gradient in pixels. Controls how blurred the animated gradient background appears.
gradientSizenumber0.65Size of the gradient (0-1). Controls the radius of the gradient circles. Higher values create larger, more spread out gradients.
gradientIntensitynumber0.7Intensity/opacity of the gradient (0-1). Controls how vibrant and visible the gradient colors are. Higher values create more intense colors.
enableKeyboardbooleantrueEnable keyboard arrow keys navigation. When enabled, users can navigate the carousel using the left and right arrow keys.
onCardChange(index: number) => voidundefinedCallback function triggered when the active card changes. Receives the new card index as a parameter.
cardAspectRationumber0.8 (4/5)Aspect ratio of cards (width/height). Default is 4/5. Use values like 1 for square, 16/9 for landscape, etc.
initialIndexnumber0Initial card index to display when the carousel loads. Must be within the range of available images.