Orbital Image Carousel

Pro

Drag a cylindrical photo rail with snapped inertia, keyboard stepping, and depth-aware parallax on every face.

carousel
Orbital Image Carousel component preview

Overview

Orbital Image Carousel is a React and Tailwind CSS 3D image carousel that wraps photos around a rotating cylinder, in Next.js or any React app, built on Framer Motion. Drag to spin it with inertia that snaps to the nearest card, or step with the arrow keys, while each face shifts in parallax by its depth. Cards take a source, alt text, label, and object position, and the others dim while one is hovered. Radius, perspective, and card size are props. Reduced motion turns off dragging and the staggered entrance, so the arrow keys become the way to rotate it.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add orbital-image-carousel

Usage

Import OrbitalImageCarousel from @/components/wensity/orbital-image-carousel and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import {
OrbitalImageCarousel,
type OrbitalImage,
} from "@/components/wensity/orbital-image-carousel";
const images: OrbitalImage[] = [
{
src: "https://assets.wensity.com/photos/portrait/white-peaks-fog.webp",
alt: "Fogbound white mountain range at dawn",
label: "White Peaks",
},
{
src: "https://assets.wensity.com/photos/portrait/golden-meadow-path.webp",
alt: "A stone path through a golden mountain meadow",
label: "Meadow Path",
},
{
src: "https://assets.wensity.com/photos/portrait/desert-dunes-gold.webp",
alt: "Golden sand dunes at sunset",
label: "Desert Dunes",
},
];
export default function Example() {
return (
<OrbitalImageCarousel
images={images}
cardWidth={280}
cardHeight={372}
radius={460}
/>
);
}

Props

PropTypeDefaultDescription
images(string | OrbitalImage)[]-Image URLs or structured image objects with src, alt, label, and objectPosition.
cardWidthnumber320Width of each orbiting image panel in pixels.
cardHeightnumber392Height of each orbiting image panel in pixels.
radiusnumber470Depth radius of the cylinder.
perspectivenumber1700CSS perspective applied to the carousel stage.
initialRotationnumber0Initial Y-axis rotation in degrees.
draggablebooleantrueEnable pointer drag rotation when motion is allowed.
snapToCardbooleantrueSnap inertia targets to the nearest image angle.
inactiveOpacitynumber0.42Opacity used for non-hovered panels while another panel is hovered.

Featured in React carousel components.