3
1 Comment

Top 7 Open Source Draggable Grid Layout UI Libraries for the Web

Here is a collection of the most reliable libraries for building grid layouts with support for draggable components in React, vanilla Js, or directly into the HTML5 canvas in 2D or 3D.

1. React-Grid-Layout

A draggable and resizable grid layout with responsive breakpoints, for React

React-Grid-Layout is a library for draggable and resizable grid layouts, with responsive breakpoints, for React. The most complete and popular of all the solutions.

React-Draggable above is part of this framework.

2. Konva.js

Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications

Konva.js is a framework for 2D object manipulation implemented with HTML canvas. Seems incredibly powerful, although the site looks dated, which might be a consequence of it being a one person project.

Additionally React-Konva is a Konva components library for React.

3. Gridstack

Mobile-friendly modern Typescript library for dashboard layout and creation. Making a drag-and-drop, multi-column responsive dashboard has never been easier. Has multiple bindings and works great with React, Vue, Angular, Knockout.js, Ember and others

Gridstack is a vanilla framework optimized for dashboards.

4. Packery

Packery is a JavaScript library and jQuery plugin that makes gapless and draggable layouts. It uses a bin-packing algorithm to fill in empty gaps. Packery layouts can be intelligently ordered or organically wild. Elements can be stamped in place, fit in a specific spot, or dragged around. It’s perfect for draggable dashboard and seamless Masonry image galleries

Packery a library for creating grid layouts with dragging capabilities.

Appears to be more limited in the layout options than React-Grid-Layout, and doesn't appear to be in active development.

5. Draggabilly

Make that shiz draggable

Rad because it supports mouse and touch devices

Draggabilly is a vanilla JS library for implementing drag-n-drop capabilities.

6. Gridster

Gridster is a jQuery plugin that allows building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically add and remove elements from the grid

Gridster is a jQuery plugin for building draggable grid layouts. No longer in development. It was the inspiration for Gridstack.

7. Bonus: Raw 2D and 3D UI creation

The libraries below rely on HTML5 canvas for rendering. Full screen canvas could become a performance bottleneck, but it could be the right solution for the right problem.

  • PixiJS is a 2D WebGL rendering library.
  • React-three-fiber is a React renderer for three.js.
  • D3.js a solid solution for data driven applications.
  • Paper.js my favorite solution for SVG vector apps.

Conclusion

For very simple projects in React, I will go with React-Draggable, or React-Grid-Layout if I need more complex UIs. If I can't use React, Konva seems like a great solution for using with Vanilla.js.

  1. 1

    Thank you for sharing this list of open-source libraries for building draggable grid layouts! It's great to see the variety of options available, including solutions for React, vanilla JavaScript, and HTML5 canvas. I'm especially interested in React-Grid-Layout, as it seems to be the most complete and popular of the solutions. I'll definitely check it out and see if it fits the needs of my current project. Thanks again for the useful resources!

Trending on Indie Hackers
Passed $7k 💵 in a month with my boring directory of job boards 35 comments Reaching $100k MRR Organically in 12 months 32 comments 87.7% of entrepreneurs struggle with at least one mental health issue 14 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 11 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments Are you wondering how to gain subscribers to a founder's X account from scratch? 9 comments