Menu

Rotating Carousel

Customize

Face Count12
Face Width150
Face Height140
Initial Rotation0
Card Gap10
Drag Sensitivity1
Smoothness0.25
Inertia Resistance7
Shade Intensity0.85
Shade Base0.15
Auto Rotate Speed (s)30
Entrance Duration (s)0.9
Entrance Stagger (s)0.07

Props

imagesstring[]

Array of image URLs to use for the carousel faces. Cycled with modulo if faceCount exceeds array length.

Default[...6 demo images]
faceCountnumber

Number of faces in the 3D wheel (clamped between 3 and 12).

Default6
faceWidthnumber

Width of each face in pixels.

Default300
faceHeightnumber

Height of each face in pixels.

Default300
maxFaceWidthnumber

Optional cap on the responsive face width. Defaults to faceWidth when not set.

Defaultundefined
minFaceWidthnumber

Smallest the face will shrink to on tiny screens when responsive is enabled.

Default120
responsiveboolean

Scale faces to fit the container width using a ResizeObserver, clamped between minFaceWidth and maxFaceWidth/faceWidth, preserving aspect ratio.

Defaulttrue
cardGapnumber

Extra pixels added to the wheel radius to space faces apart. Positive values push faces further apart; negative values bring them closer/overlap.

Default0
draggableboolean

Enable or disable drag-to-rotate interaction. When false, the wheel cannot be dragged (inertia is also disabled), though auto-rotate still works.

Defaulttrue
dragSensitivitynumber

Multiplier applied to drag movement to control rotation speed while dragging.

Default1
shadeIntensitynumber

Intensity of the opacity shading applied to faces based on their rotation angle.

Default0.85
shadeBasenumber

Base/minimum opacity applied to faces regardless of angle.

Default0.15
autoRotateboolean

Enable continuous automatic rotation of the wheel.

Defaultfalse
autoRotateSpeednumber

Duration (seconds) for one full automatic rotation.

Default12
autoRotateDirectionnumber

Direction of auto-rotation: 1 for clockwise, -1 for counter-clockwise.

Default1
smoothnessnumber

Tween duration (seconds) used to smooth drag-based rotation updates.

Default0.25
inertiaboolean

Whether the wheel continues spinning with momentum after a drag release.

Defaulttrue
inertiaResistancenumber

Multiplier controlling how far the wheel spins from inertia after drag release.

Default7
pauseAutoRotateOnHoverboolean

Pause automatic rotation while the pointer is hovering over the carousel.

Defaulttrue
initialRotationnumber

Initial rotationY offset (in degrees) applied to the wheel on mount.

Default0
faceFit"cover" | "contain" | "fill"

CSS background-size value used for each face image.

Default"cover"
onFaceChange(index: number) => void

Callback fired whenever the nearest-facing face index changes during rotation.

Defaultundefined
entranceAnimationboolean

Enable/disable the entrance animation played when the component first mounts.

Defaulttrue
entranceType"pop" | "fade" | "bottom" | "top" | "flip" | "scatter" | "spin"

Preset style for the mount entrance animation.

Default"spin"
entranceDurationnumber

Duration of the entrance animation in seconds.

Default0.9
entranceStaggernumber

Delay (in seconds) between each face animating in during entrance.

Default0.07
entranceEasestring

GSAP ease string used for the entrance animation (e.g. "power2.out", "elastic.out(1, 0.5)").

Default"back.out(1.4)"
filterOnHoverboolean

Toggle the grayscale/dark filter on a face when hovering over it.

Defaulttrue
defaultFilteredboolean

Whether faces start with the grayscale/dark filter applied by default. Hovering inverts this state per face.

Defaulttrue
classNamestring

Custom class name applied to the outer wrapper div of the carousel.

Default""
cardClassNamestring

Custom class name applied to each individual face (card) element, merged with the default "rc-face" class.

Default""

Dependencies

gsap 3.15.0

Crafted withbyMohammad Tasin