Cool Slide Gallery

A coverflow-style 3D gallery with configurable tilt, depth, and scale. Pass slides or use the bundled demos. Built with motion.

Default

Cards fan in perspective with tilt and depth. Drag, arrows, dots, titles, badges, and keyboard navigation.

Loading…

Installation

CLI
npx @sonojs/ui@latest add cool-slide-gallery
Also needsnpm i lucide-react motion

Usage

Demo images install under components/carousels/cool-slide-gallery/images/. Pass your own slides when you replace them.

page.tsx
"use client"

import { CoolSlideGallery } from "@/components/carousels/cool-slide-gallery"

export default function Page() {
  return (
    <CoolSlideGallery
      cardWidth={360}
      cardHeight={420}
      showTitle
      showArrows
      showDots
      draggable
      keyboardNavigation
      easing="smooth"
    />
  )
}

Props

PropTypeDefaultDescription
slidesCoolSlideGallerySlide[]bundled imagesSlides with `src` and optional `alt` / `title` / `subtitle` / `badge`. Defaults to static imports from `./images/`.
cardWidthnumber380Card width in pixels.
cardHeightnumber440Card height in pixels.
radiusnumber5Border radius scale 0–20.
tiltnumber14Y-rotation (degrees) on side cards.
sideTiltnumber6Z-rotation (degrees) lean on side cards.
gapnumber8Horizontal gap multiplier between cards.
dimOpacitynumber55Dim intensity 0–100 on inactive cards.
autoplaybooleanfalseAdvance automatically while in view.
autoplayDirection"left-to-right" · "right-to-left""right-to-left"Autoplay step direction.
autoplayDelaynumber2.8Seconds between autoplay steps.
animationDurationnumber0.6Transition duration in seconds.
easingEasingPreset"smooth"`smooth` | `spring` | `bouncy` | `snappy`.
showTitlebooleantrueTitle / subtitle overlays.
titlePositionTitlePosition"bottom-left"`bottom-left` | `bottom-right` | `top-left` | `top-right` | `center` (logical start/end).
showArrowsbooleantruePrev / next controls.
showDotsbooleantrueDot indicators.
showCounterbooleanfalseSlide counter text.
showBadgebooleantrueBadge labels on titles.
clickablebooleantrueClick side cards to navigate.
draggablebooleantruePointer drag / swipe.
dragThresholdnumber45Minimum drag distance in px.
keyboardNavigationbooleantrueArrow keys to step.
maxVisiblenumber2Side cards visible on each side.
depthnumber230Z-translate per offset step.
scaleStepnumber0.15Scale reduction per offset from center.
perspectivenumber1500CSS perspective on the stage.
onSlideChange(index: number, slide: CoolSlideGallerySlide) => void-Fires when the active index changes.
classNamestring-Extra classes on the root.