Drag-and-drop has been with us for decades. It helps us to get things done on both our desktop and mobile apps and operating systems. There’s both a simplicity and intuitiveness that has led to it become one of the most universal UI features.
So it’s no wonder that drag-and-drop has invaded the web over the past few years. From uploading files in Dropbox to sorting our Trello boards – its usefulness has been proven time and again.
There are a number of creative ways we can implement these interfaces into our own designs. Let’s take a look at 10 unique examples of drag-and-drop UI from CodePen:
The Web Designer Toolbox
Unlimited Downloads: 500,000+ Web Templates, Themes, Plugins & Design Assets
Learn the Basics
Before you can go really in-depth with implementing drag-and-drop, it’s important to learn some fundamentals. That’s where this simple snippet that utilizes Angular can come in handy. It’s a basic exercise in dragging a square element from one side of the screen to the other. An alert pops up when you’re finished. Nothing fancy, but it could be useful for grasping the concepts involved.
Speaking of Trello, the task management tracker’s implementation of drag-and-drop is incredibly useful. Here’s an example that stays pretty faithful to what makes Trello so cool. You can drag panels from column to column, and there’s an awesome color-changing effect when something is moved to a new spot.
Build Your Own Kaleidoscope?
Drag a Simple Page Element
On our desktop or laptop computers, we sometimes want to move a specific element off to the side. It’s still in view – but out of the way of other, more important items. That’s exactly what this dead-simple jQuery button does for the web. Move it to anywhere on the screen for later viewing.
HTML5 Drag-and-Drop API
We often see drag-and-drop used with forms. A WordPress Plugin like Gravity Forms comes to mind, where fields can be added and repositioned quite intuitively. Here we have a form builder UI that uses HTML5 and Angular.js.
Scalable Pixel Art
Adding images via drag-and-drop is quite common. But, like the kaleidoscope above, this snippet provides a unique use case. You can drag an image into a specified
div and it creates CSS-based pixel art that can be scaled to up to 20x the original size. It also outputs CSS code to paste into your project. A good representation of how useful this UI can be.
Easily Add Events
The ability to rearrange data is a prime use of dragging. This calendar example shows how we can use the UI to place events on specific dates and even switch between dates, if necessary. It shows how implementing drag-and-drop can take the pain points out of common tasks.
It’s a Knockout
The file upload field has been around for years. But drag-and-drop makes it so much more user friendly. Here we have a couple of example fields using Knockout.js. The first allows for dragging a single file, the other allowing for multiple uploads. But both offer a preview of the file, adding further visual confirmation to the UI.
Moving From a Scrollable Container
This is one we don’t see very often. The scrollable container at the top of this snippet contains boxes that can be moved to another
div down below. It shows that a scrollable interface can be quite usable in this type of scenario.
Dragging You Towards a Better UI
There are a number of ways that a drag-and-drop UI can benefit the user-friendliness of your website. Hopefully, the examples above will provide you with some inspiration regarding how you can use this familiar feature to enhance your projects.