Pragmatic drag and drop
Flexible and fast drag and drop for any experience on any tech stackPragmatic drag and drop is a performance focused drag and drop library that can be used to power any drag and drop experience on any tech stack. Pragmatic drag and drop makes working with the browsers powerful and flexible built in drag and drop functionality safe and easy.
Get started
- Check out our examples to be inspired
- Head over to our tutorial to learn about all the pieces
- Grab the core package and start building!
Capabilities
Pragmatic drag and drop consists of a few high level pieces:
- Low level drag and drop behavior
Pragmatic drag and drop contains a core package, and a number of optional packages, that provide you the pieces to create any drag and drop experience.
These pieces are unopinionated about visual language or accessibility, and have no dependency on the Atlassian Design System.
- Tiny: ~
4.7kBcore - Incremental: Only use the pieces that you need
- Headless: Full rendering and style control
- Framework agnostic: Works with any frontend framework
- Deferred compatible: Delay the loading the core packages and optional packages in order to further improve page load speeds
- Flexible: create any experience you want, make any changes you want during a drag operation.
- Works everywhere: Full feature support in Firefox, Safari, and Chrome, iOS and Android
- Virtualization support: create any virtual experience you want!
- Optional visual outputs
We have created optional visual outputs (eg our drop indicator) to make it super fast for us to build consistent Atlassian user experiences. Non Atlassian consumers are welcome to use these outputs, create their own that copy the visual styling, or go a totally different direction.
- Optional assistive technology controls
Not all users can achieve pointer based drag and drop experiences. In order to achieve fantastic experiences for assistive technology users, we provide a toolchain to allow you to quickly wire up performant assistive technology friendly flows for any experience.
The optional assistive controls we provide are based on the Atlassian Design System. If you do not want to use the Atlassian Design System, you can use our guidelines and substitute our components with your own components, or you can go about accessibility in a different way if you choose.
Detailed capabilities
- Supports dragging of any entity types (such as elements, text, images, external files)
- Any nested configuration of drop targets you like
- Flexible drop target sizes
- Can add, remove, or change drop targets while dragging
- Conditional dropping
- Automatic scrolling
- Stickiness: a drop target can maintain selection even after it is no longer being dragged over
dropEffect, (opens new window) control- High frequency input updates to power high fidelity interactions
(Using the element adapter)
- Drag handles (drag a
draggableelement) by a part of it - Conditional dragging
- Nested
draggableelements - Flexible
draggablesizes - Many options to customize the appearance of the drag preview (the thing that a user drags around during a drag)
- Can add, remove, or change
draggableswhile dragging (even the draggingdraggable) - An element can be a drop target,
draggableor both - An element can be a drop target for different entities (eg
dropTargetForElementsanddropTargetForExternal)
How it works
A technical explanation of how Pragmatic drag and drop is architected for speed