The strongest "practical" front-end drag component in the open source of Atlassian: excellent performance and compatibility, cross window drag support, applicable to any front-end framework

Source: OSCHINA
Edit: game
2024-04-25 10:47:28

Pragmatic drag and drop is a front-end drag component, which is open source by the well-known software development company Atlassian.

As the Pragmatic ("practical") in its name says, this component supports many drag scenarios, attaches great importance to performance, and becomes safe and simple by using the browser's powerful and flexible built-in drag function.

At present, the core products of Atlassian, such as Trello, Jira and Confluence, all use Pragmatic drag and drop.

Before Pragmatic drag and drop, Alex Reardon, the author of this component, also created another popular React open source drag component react-beautiful-dnd

In contrast, Pragmatic drag and drop supports more drag scenes:

  • list

  • panel

  • form

  • tree

  • Grids

  • Drawing

  • Resizing

The following figure shows the operational effects of Pragmatic Drag and Drop in different scenes:

Pragmatic drag and drop also supports the use in any front-end framework (such as React, Svelte, Vue, Angular), which is not limited by the specific technology stack.

The writing method used in different frameworks is as follows:

  • React

     

  • Svelte

     

  • JS

     

Compared with other open source drag components of the same type, the Pragmaticdrag and drop core package after compression is more lightweight, only 4.7 kb.

In terms of performance, compare the following open source frameworks of the same type:

  • react-beautiful-dnd

  • react-dnd

  • dnd-kit

The TTI index of Pragmaticdrag and drop can be described as "far ahead".

TTI: Time to Interactive, Interactive time. This indicator is mainly used to measure the time required for a page to be loaded from the beginning to the completion of rendering of the main sub resources, and to respond quickly and reliably to user input.


Reference link

https://www.youtube.com/watch?v=5SQkOyzZLHM

https://atlassian.design/components/pragmatic-drag-and-drop/about

https://mp.weixin.qq.com/

Expand to read the full text
Click to lead the topic 📣 Post and join the discussion 🔥
zero comment
ten Collection
 Back to top
Top