All Projects → dflex-js → dflex

dflex-js / dflex

Licence: MIT license
The sophisticated Drag and Drop library you've been waiting for 🥳

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to dflex

Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: ✭ 23,641 (+2833.13%)
Mutual labels:  drag-and-drop, sortable, droppable, draggable
Dnd Kit
A modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
Stars: ✭ 3,456 (+328.78%)
Mutual labels:  drag-and-drop, sortable, droppable, draggable
Smooth Dnd
drag and drop library for javascript
Stars: ✭ 408 (-49.38%)
Mutual labels:  dnd, drag-and-drop, sortable, draggable
Ngx Smooth Dnd
angular wrapper for smooth-dnd
Stars: ✭ 152 (-81.14%)
Mutual labels:  dnd, drag-and-drop, sortable, draggable
React Movable
🔀 Drag and drop for your React lists and tables. Accessible. Tiny.
Stars: ✭ 1,064 (+32.01%)
Mutual labels:  dnd, drag-and-drop, sortable
Angular Skyhook
An implementation of react-dnd for Angular.
Stars: ✭ 146 (-81.89%)
Mutual labels:  dnd, drag-and-drop, sortable
React Dragtastic
A simple drag and drop library for React which uses the more stable mouseDown/mouseUp event pattern instead of the problematic HTML5 drag and drop API
Stars: ✭ 181 (-77.54%)
Mutual labels:  dnd, drag-and-drop, draggable
react-native-dnd-board
A drag and drop Kanban board for React Native.
Stars: ✭ 41 (-94.91%)
Mutual labels:  dnd, drag-and-drop, draggable
Dragact
a dragger layout system with React style .
Stars: ✭ 710 (-11.91%)
Mutual labels:  drag-and-drop, sortable, draggable
Jquery Sortablejs
A jQuery binding for SortableJS
Stars: ✭ 94 (-88.34%)
Mutual labels:  drag-and-drop, sortable, draggable
React Smooth Dnd
react wrapper components for smooth-dnd
Stars: ✭ 1,560 (+93.55%)
Mutual labels:  drag-and-drop, sortable, draggable
React Beautiful Dnd
Beautiful and accessible drag and drop for lists with React
Stars: ✭ 25,810 (+3102.23%)
Mutual labels:  dnd, drag-and-drop, sortable
Muuri
Infinite responsive, sortable, filterable and draggable layouts
Stars: ✭ 9,797 (+1115.51%)
Mutual labels:  dnd, drag-and-drop, draggable
Easy Dnd
A drag and drop implementation for Vue.js 2 https://codesandbox.io/s/easy-dnd-demo-9mbij https://codesandbox.io/s/easy-dnd-demo-2-xnqbz
Stars: ✭ 202 (-74.94%)
Mutual labels:  dnd, drag-and-drop, sortable
dnd
Beautiful and accessible drag and drop for lists with React.
Stars: ✭ 271 (-66.38%)
Mutual labels:  dnd, drag-and-drop, sortable
Vue Smooth Dnd
Vue wrapper components for smooth-dnd
Stars: ✭ 1,121 (+39.08%)
Mutual labels:  drag-and-drop, sortable, draggable
Lean Mean Drag And Drop
Drag&Drop Sorting and Reordering script for complex nested structures
Stars: ✭ 107 (-86.72%)
Mutual labels:  drag-and-drop, sortable, draggable
vue3-smooth-dnd
Vue3 wrapper components for smooth-dnd
Stars: ✭ 92 (-88.59%)
Mutual labels:  dnd, drag-and-drop, draggable
vue-dnd-zone
vue.js plugin for drag and drop functionality
Stars: ✭ 144 (-82.13%)
Mutual labels:  drag-and-drop, sortable, draggable
slate-react-dnd-plugin
No description or website provided.
Stars: ✭ 35 (-95.66%)
Mutual labels:  dnd, drag-and-drop

Dflex logo

JavaScript Project to Manipulate DOM Elements

Dflex build status number of opened pull requests number of opened issues Dflex welcomes pull request

DFlex

A Drag-and-Drop library for all JavaScript frameworks implementing an enhanced transformation mechanism to manipulate DOM elements. It is so far the only library on internet that manipulates the DOM instead of reconstructing it.

Features

  • Dynamic architecture.
  • Traverse DOM without calling browser API.
  • Transform elements instead of reordering the DOM tree.
  • Animated movement from point-x to point-y.
  • Prevent drag and drop layout shift.
  • Isolated from data flow.
  • Headless as it is just functions that do manipulation.
  • Event driven API.
  • Targeting each DOM node individually.
  • Extensible using JSON tree instead of flat recursion.
  • Support three different types of restrictions:
    1 -Restricted area related to the parent container.
    2- Restricted area related to the viewport.
    3- Restricted area related to the position itself.
  • Support four types of custom events with custom layout state emitter.
  • Auto remove selection when starting dragging.

Implemented Transformation 💡

  • The original input order which appears when inspecting elements stays the same. While the visual order happens after transformation and it's supported by the data-index attribute to know the order of elements in the visual list.

    original and visual order

  • To enable handling a large set of elements, the transformation is related to the viewport. No matter how many elements are affected, DFlex only transforms elements visible on the screen. Elements outside the viewport are triggered to a new position when they are visible.

    Trigger elements visible on the screen

  • Support strict transformation between containers.

    Handle orphaned container

Project Content 🚀

@dflex/dom-gen

DFlex DOM relations generator algorithm. It Generates relations between DOM elements based on element depth so all the registered DOM can be called inside registry without the need to call browser API. Read once, implement everywhere.

@dflex/core-instance

Core instance is the mirror of interactive element that includes all the properties and methods to manipulate the node.

@dflex/utils

A collection of shared functions. Mostly classes, and types that are used across the project.

@dflex/store

DFex Store has main registry for all DOM elements that will be manipulated. It is a singleton object that is accessible from anywhere in the application. The initial release was generic but it only has the Core of the library since ^V3.

@dflex/draggable

Light weight draggable element without extra functionalities that is responsible for interacting with the DOM and moving the affected element(s).

@dflex/dnd

The main package that depends on the other packages. It is responsible for the magical logic of the library to introduce the drag and drop interactive functionality.

Documentation 📖

Visit DFlex site for more https://www.dflex.dev/

Local Development 📦

DFlex contains multiple packages that shapes the final product. All Packages are decoupled and work separately. Each package has it own universe including test and playground or at lease this is the initial plan.

DFlex is written entirely in plain JavaScript/TypeScript and doesn't depend on any specific framework. However, it's using the React for playground and Cypress for end to end testing. It's also using Jest for unit testing and PNPM to manage the packages.

Clone the repository

git clone https://github.com/dflex-js/dflex.git
cd dflex
pnpm install

To start development you can use the following command:

pnpm -F @dflex/dnd server

This will run the development playground for the DnD package. Open the browser http://localhost:3001 to see the playground. You can check the code in the packages/dnd/playgrounds to see the available routing.

If you want to change the codebase and live edit the playground you have to compile while running the playground. You can use the following command:

pnpm -F @dflex/dnd compile:w
pnpm -F @dflex/dnd build:w
pnpm -F @dflex/dnd run server

After finish editing you can make sure the changes you make are not going to break the code. You can do that by running the test and have some fun watching Cypress do the job:

pnpm -F @dflex/dnd test

Contribution 🌎

PRs are welcome, If you wish to help, you can learn more about how you can contribute to this project in the Contributing guide.

To submit a PR:

1- Fork DFlex then clone the repository.

2- Create a new branch: git checkout -b my-branch-name.

3- Make your change.

4- Push to your fork and submit a pull request when ready.

Work in progress 🔨

DFlex is a work in progress. The transformation between containers is still in development. Yet, you can use the library in your project if you depend on transformation inside one container.

License 🤝

DFlex is MIT License since version 3.0.0 and above.

Author

Jalal Maskoun (@jalal246)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].