3D Carousel

A dynamic and interactive 3D carousel component using Three.js and Motion-V, allowing smooth infinite rotation and user-controlled interactions.

API

Prop NameTypeDefaultDescription
itemsunknown[][]List of images or elements to be displayed in the carousel.
classstring""Additional CSS classes for styling the carousel overlay.
containerClassstring""CSS classes for styling the carousel container.
widthnumber450Width of individual carousel items.
heightnumber600Height of individual carousel items.

Component Code

You can copy and paste the following code to create this component:

Carousel3D.vue

Features

  • 3D Rotating Carousel: Displays a rotating 3D carousel using Three.js.
  • Smooth Infinite Rotation: The carousel continuously rotates smoothly.
  • User Interaction Support: Supports mouse and touch interactions to manually rotate the carousel.
  • Fully Responsive: Adapts to different screen sizes dynamically.
  • Performance Optimized: Utilizes Motion-V for smooth animations and easing functions.
  • Dynamic Item Rendering: Accepts an array of items to render in the carousel dynamically.
  • Dark Mode Support: Adaptable to dark and light themes for better UI consistency.

Credits

  • Built using Three.js for 3D rendering.
  • Utilizes Motion-V for seamless animations.
  • Thanks @safakdinc for sharing this component.