Make your interfaces dynamic and interactive with JavaScript drag and drop components. This collection features everything from sortable lists and draggable cards to file upload zones and custom UI builders - crafted using both native HTML5 APIs and elegant JavaScript libraries.
29 JavaScript Drag and Drop
3D Glass Photo Lens
demo & codeThis 3D Glass Photo Lens creates a stunning, tactile digital object - a thick glass block that refracts user-uploaded photos. Built with Three.js, it simulates the physics of light (transmission, IOR, thickness) to produce high-fidelity glass renders directly in the browser. Users can change the lens shape (Heart, Square, Hexagon), adjust the glass tint, and even modify the environmental lighting to see how reflections dance across the beveled edges.
Interactive SVG Color Wheel
demo & codeThis Interactive SVG Color Wheel is a sophisticated design tool built directly into the browser. It allows users to explore color harmonies - Analogous, Complementary, Triadic, Tetradic - by dragging a handle across a mathematically generated wheel. The interface reacts instantly, updating the background, UI elements, and data display with the selected palette, powered by the precision of Chroma.js and GSAP animations.
Draggable 3D Cube with Dynamic Lighting
demo & codeThis Draggable 3D Cube goes beyond standard CSS 3D transforms by implementing a custom “lighting engine” using JavaScript. As the user drags to rotate the carousel, the opacity of each face is dynamically calculated based on its angle relative to the viewport. This creates a realistic shading effect - faces facing the viewer are bright and fully opaque, while those turning away fade into the background, enhancing the perception of depth without using WebGL.
Draggable 3D Parallax Image Ring
demo & codeThis Draggable 3D Parallax Image Ring creates a high-end, immersive gallery experience often associated with WebGL, but built entirely with DOM elements and GSAP. It arranges images in a 3D circle that users can spin with a swipe or mouse drag. The standout feature is the calculated parallax effect: as the ring rotates, the background position of each image shifts in the opposite direction, creating a convincing illusion of depth and window-like transparency.
Drag and Drop
An intuitive task management interface that instantly updates the visual status of items as they are moved.
See the Pen Drag and Drop.
Vertical Full-Screen Slider with 4 Controls
A high-performance, fluid, and responsive slider rich in interactivity, where motions are synchronized with user actions to create a “weighted,” physically tangible interface feel.
See the Pen Vertical Full-Screen Slider with 4 Controls.
Solar System Datepicker
A playful and unconventional date selection method where the user ’travels through time’ by physically rotating the solar system.
See the Pen Solar System Datepicker.
Image Gallery with GSAP Observer Plugin
A seamless image slider featuring an infinite-scroll SVG navigation menu powered by GSAP’s Observer plugin. The interaction logic translates scroll and swipe deltas into timeline progress, utilizing complex snapping algorithms and opacity tweens to create a fluid, kinetic browsing experience that dynamically updates the active index.
See the Pen Image Gallery with GSAP Observer Plugin.
Drag and Drop State Machine
XState-powered drag & drop implementation with finite state machine. Features visual state transitions, smooth animations, and contextual feedback.
See the Pen Drag and Drop State Machine.
Container Query Bookstore
Integration of Drag and Drop functionality using Dragula.js and Web Components. The Dragula script handles the drop event, dynamically changing the background color of the stage container via a CSS variable taken from the dragged element.
See the Pen Container Query Bookstore.
Sliding Puzzle with GSAP Draggable and Tailwind CSS
An implementation of a sliding puzzle using GSAP Draggable - featuring a custom snap function for grid alignment and onThrowComplete logic that uses hitTest to determine move validity and trigger the swap animation.
See the Pen Sliding Puzzle with GSAP Draggable and Tailwind CSS.
Interactive Jello Text with Variable Fonts
Interactive typography with GSAP and SplitText - when one letter is dragged, the effect elastically propagates to its neighbors, dynamically changing their font-weight and scaleY.
See the Pen Interactive Jello Text with Variable Fonts.
Carousel with Drag and Wheel Input
This purely vanilla JS/CSS image carousel delivers superior performance with native drag-and-wheel input support, dynamically controlling the 3D-like layout using calculated CSS Custom Properties for position and depth.
See the Pen Carousel with Drag and Wheel Input.
Infinite Scrollable and Draggable WebGL Grid
This demo showcases advanced THREE.js implementation using coordinate wrapping and custom shaders to create a highly performant, infinitely scrollable and draggable WebGL grid with motion-based visual feedback.
See the Pen Infinite Scrollable and Draggable WebGL Grid.
3D Slider Cards Carousel
An immersive 3D Circular Slider using GSAP for smooth, complex transform animations and rotations, creating a perspective-driven carousel where card properties are dynamically mapped and updated upon rotation.
See the Pen 3D Slider Cards Carousel.
Interactive Schedule Widget
This demo shows how to create a useful and interactive schedule widget with synchronized horizontal scrolling for the header and content. It implements drag navigation and dynamically determines and positions the current time.
See the Pen Interactive Schedule Widget.
Kinetic Brutalism: A 3D Parallax Effect
A showcase of the synergy between JavaScript and CSS to create a detailed 3D element with a parallax effect. It uses requestAnimationFrame for performance-optimized calculation of velocity and position, and transform-style: preserve-3d for correct layer rendering.
See the Pen Kinetic Brutalism: A 3D Parallax Effect.