HOME

TheInfoList



OR:

In
computer A computer is a machine that can be Computer programming, programmed to automatically Execution (computing), carry out sequences of arithmetic or logical operations (''computation''). Modern digital electronic computers can perform generic set ...
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
s, drag and drop is a pointing device gesture in which the user selects a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object. In general, it can be used to invoke many kinds of actions, or create various types of associations between two
abstract object In philosophy and the arts, a fundamental distinction exists between abstract and concrete entities. While there is no universally accepted definition, common examples illustrate the difference: numbers, sets, and ideas are typically classif ...
s. As a feature, drag-and-drop support is not found in all
software Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications. The history of software is closely tied to the development of digital comput ...
, though it is sometimes a fast and easy-to-learn technique. However, it is not always clear to users that an item can be dragged and dropped, or what command is performed by the drag and drop, which can decrease usability.


Actions

The basic sequence involved in drag and drop is: * Move the pointer to the object * Press, and hold down, the button on the
mouse A mouse (: mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus'' ...
or other
pointing device A pointing device is a human interface device that allows a User (computing)#End-user, user to input Three-dimensional space, spatial (i.e., continuous and multi-dimensional) data to a computer. Graphical user interfaces (GUI) and Computer- ...
, to "grab" the object * "Drag" the object to the desired location by moving the pointer to this one * "Drop" the object by releasing the button Dragging requires more physical effort than moving the same pointing device without holding down any buttons. Because of this, a user cannot move as quickly and precisely while dragging (see
Fitts' law Fitts's law (often cited as Fitts' law) is a predictive model of human movement primarily used in human–computer interaction and Human factors and ergonomics, ergonomics. The scientific law, law predicts that the time required to rapidly move to ...
). However, drag-and-drop operations have the advantage of thoughtfully chunking together two operands (the object to drag, and the drop location) into a single action. Extended dragging and dropping (as in graphic design) can stress the mousing hand. A design problem appears when the same button selects and drags items. Imprecise movement can cause an attempt to select an object to register as a dragging motion. Another problem is that the target of the dropping can be hidden under other objects. The user would have to stop the dragging, make both the source and the target visible and start again. In classic Mac OS the top-of-screen menu bar served as a universal "drag cancel" target. This issue has been dealt with in
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
with the introduction of Exposé.


In Mac OS

Drag and drop, called click and drag at the time, was used in the original Macintosh to manipulate files (for example, copying them between disks or folders).
System 7 System 7 (later named Mac OS 7) is the seventh major release of the classic Mac OS operating system for Macintosh computers, made by Apple Computer. It was launched on May 13, 1991, to succeed System 6 with virtual memory, personal file shari ...
added the ability to open a document in an application by dropping the document icon onto the application's icon. Apple added "Macintosh Drag and Drop" to System 7.5, extending "click and drag" to common clipboard operations like copying or moving textual content within a document. Content could also be dragged into the filesystem to create a "clipping file" which could then be stored and reused. Files could also be dropped on application windows, for example to enclose a document in an email, or add an image to a word processor document. For most of its history Mac OS has used a single button mouse with the button covering a large portion of the top surface of the mouse. This may mitigate the ergonomic concerns of keeping the button pressed while dragging.


In OS/2

The
Workplace Shell The Workplace Shell (WPS) is an object-oriented desktop shell (also called desktop environment) produced by IBM's Boca Raton development lab for OS/2 2.0. It is based on Common User Access and made a radical shift away from the Program Manager t ...
of
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
uses dragging and dropping extensively with the secondary mouse button, leaving the primary one for selection and clicking. Its use like that of other advanced Common User Access features distinguished native OS/2 applications from
platform-independent Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform softw ...
ports.


In Web design


In HTML

The
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
working draft specification includes support for drag and drop. HTML5 supports different kinds of dragging and dropping features including: * Drag and Drop texts and HTML codes * Drag and Drop HTML elements * Drag and Drop files Based on needed action, one of the above types can be used. Note that when an HTML element is dragged for moving its current position, its ID is sent to the destination parent element; so it sends a text and can be considered as the first group. Google's web-based e-mail application
Gmail Gmail is the email service provided by Google. it had 1.5 billion active user (computing), users worldwide, making it the largest email service in the world. It also provides a webmail interface, accessible through a web browser, and is also ...
supports drag-and-drop of images and attachments in the latest
Google Chrome Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
browser and Apple's
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
(5.x). Google Images permits users to drag and drop image files into a browser to perform a
reverse image search Reverse image search is a content-based image retrieval (CBIR) Query string, query technique that involves providing the CBIR system with a sample image that it will then base its search upon; in terms of information retrieval, the sample image i ...
.


In Website builders

A drag and drop
website builder Website builders are tools that typically allow the construction of websites without manual code editing. They fall into two categories: * Online proprietary tools provided by web hosting service companies. These are typically intended for serv ...
(also called DIY website builders) offers a visual interface where users can create and customize their websites by simply “dragging” and “dropping” various elements onto a page without the need for
development Development or developing may refer to: Arts *Development (music), the process by which thematic material is reshaped * Photographic development *Filmmaking, development phase, including finance and budgeting * Development hell, when a proje ...
experience or knowledge of coding languages. No-code platforms have progressed well beyond the capabilities of early visual editors. With the advent of Artificial intelligence (AI), building a website has become even quicker. As of May 2025 more than 21 million
websites A website (also written as a web site) is any web page whose content is identified by a common domain name and is published on at least one web server. Websites are typically dedicated to a particular topic or purpose, such as news, education ...
were constructed with usage of drag and drop
website builder Website builders are tools that typically allow the construction of websites without manual code editing. They fall into two categories: * Online proprietary tools provided by web hosting service companies. These are typically intended for serv ...
. The market leaders are:


On a touch screen

Touch screen interfaces also include drag and drop, or more precisely, long press, and then drag, e.g. on the
iPhone The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
or Android home screens.
iOS 11 iOS 11 is the iOS version history, eleventh major release of the iOS mobile operating system developed by Apple Inc., Apple, being the successor to iOS 10. It was announced at the company's Worldwide Developers Conference on June 5, 2017, and w ...
implements a drag-and-drop feature which allows the user to touch items (and tap with other fingers to drag more) within an app or between apps on
iPad The iPad is a brand of tablet computers developed and marketed by Apple Inc., Apple that run the company's mobile operating systems iOS and later iPadOS. The IPad (1st generation), first-generation iPad was introduced on January 27, 2010. ...
s. On iPhones, the functionality is only available within the same app that the user started the drag.


In end-user programming

Drag and drop is considered an important program construction approach in many
end-user development End-user development (EUD) or end-user programming (EUP) refers to activities and tools that allow end-users – people who are not professional software developers – to program computers. People who are not professional developers can use EUD to ...
systems. In contrast to more traditional, text-based programming languages, many end-user programming languages are based on visual components such as tiles or icons that are manipulated by end users through drag-and-drop interfaces.
AgentSheets AgentSheets is a Block-based programming language, block-based programming language designed for children. AgentSheets uses Drag and drop, drag-and-drop mechanisms with commands such as conditions and actions as editable blocks that could be comp ...
, a programming environment for kids, introduced the modern notion of drag and drop blocks programming providing 4 core affordances: 1) Blocks that are end-user composable, 2) blocks are end-user editable, 3) blocks can be nested to represent tree structures, 4) blocks are arranged geometrically to define syntax. Drag and drop is also featured in many shader editing programs for graphics tools, such as
Blender A blender (sometimes called a mixer (from Latin ''mixus, the PPP of miscere eng. to Mix)'' or liquidiser in British English) is a kitchen and laboratory appliance used to mix, crush, purée or emulsify food and other substances. A stationary ...
. Drag and drop also features in some video game engines, including
Unreal Engine Unreal Engine (UE) is a 3D computer graphics game engine developed by Epic Games, first showcased in the 1998 first-person shooter video game '' Unreal''. Initially developed for PC first-person shooters, it has since been used in a variety of ...
,
GameMaker Studio GameMaker (originally Animo, Game Maker (until 2011) and GameMaker Studio) is a series of cross-platform game engines created by Mark Overmars in 1999 and developed by YoYo Games since 2007. The latest iteration of ''GameMaker'' was released ...
, Construct 2 and, with expansion, Unity.


Examples

A common example is dragging an icon on a virtual
desktop A desktop traditionally refers to: * The surface of a desk (often to distinguish office appliances that fit on a desk, such as photocopiers and printers, from larger equipment covering its own area on the floor) Desktop may refer to various compu ...
to a special trashcan
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, Catholic Church, Catholic, and Lutheranism, Lutheran churches. The most common subjects include Jesus, Mary, mother of ...
to delete a file. Further examples include: * Dragging a data file onto a program
icon An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, Catholic Church, Catholic, and Lutheranism, Lutheran churches. The most common subjects include Jesus, Mary, mother of ...
or window for viewing or processing. For instance, dropping an icon that represents a text file into a Microsoft Word window signifies "Open this document as a new document in Word" * Moving or copying files to a new location/directory/folder, * Adding objects to a list of objects to be processed, * Rearranging widgets in a
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
to customize their layout, * Dragging an attribute onto an object to which the command is to be applied, ** e.g. dragging a color onto a graphical object to change its color, * Dragging a tool to a canvas location to apply the tool at that location, * Creating a
hyperlink In computing, a hyperlink, or simply a link, is a digital reference providing direct access to Data (computing), data by a user (computing), user's point and click, clicking or touchscreen, tapping. A hyperlink points to a whole document or to ...
from one location or word to another location or document. * Most word processors allow dragging selected text from one point to another. * Dragging a series of code blocks such as in
Blender A blender (sometimes called a mixer (from Latin ''mixus, the PPP of miscere eng. to Mix)'' or liquidiser in British English) is a kitchen and laboratory appliance used to mix, crush, purée or emulsify food and other substances. A stationary ...
for designing shaders and materials.


See also

* Mouse gesture *
Point and click Point and click are one of the actions of a computer user moving a pointer to a certain location on a screen (''pointing'') and then pressing a button on a mouse or other pointing device (''click''). An example of point and click is in hypermed ...
*
Snap (computer graphics) In computer graphics, snapping allows an object to be easily positioned in alignment with grid lines, guide lines or another object, by causing it to automatically jump to an exact position when the user drags it to the proximity of the desired lo ...


References

{{reflist User interface techniques