Drag-and-drop has been with us for decades. It helps us to get things done on desktops, mobile apps and operating systems. There’s both a simplicity and intuitiveness that make them 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 repeatedly.
There are a number of creative ways we can implement these interfaces into our own designs. Let’s take a look at ten unique examples of drag-and-drop UI:
Learn the Basics by Ben Parker
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.
Draggable Panels by Ettrics
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? by Justin Windle
Drag a Simple Page Element by Ben Kalsky
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 by Acauã Montiel
Form Builder by Lam Phuoc Thinh
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 by Will Boyd
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 by Subodh Ghulaxe
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. Furthermore, it shows how implementing drag-and-drop can take the pain points out of common tasks.
It’s a Knockout by Safraz Razik
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 by Blake Bowen
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 several 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 own projects.
- 10 CSS Code Snippets That Demonstrate Responsive Text Techniques
- 8 CSS Snippets for Creating Unique Horizontal Rules & Dividers
- 8 Tip-Top Toggle Switch CSS Snippets
- 8 Pure CSS Games You Can Play in Your Browser
- Set Your Text in Motion with These Dazzling Effects
- Get into the Halloween Spirit with These Spooky Snippets