PackageTrack

npm

gridstack

13.2.0gridstack/gridstack.js

TypeScript/JS lib for dashboard layout and creation, responsive, mobile support, no external dependencies, with many wrappers (React, Angular, Vue, Ember, knockout...)

Release timeline

139 releases since 2015
20152026

One column per quarter.

Releases

  1. 8.1.222 May 2023
    Release notes2 sources agree
    • #2323 module for Angular wrapper
    Open source →
  2. 8.1.113 May 2023
    Release notes2 sources agree
    • fix: #2314 fix issue with having min-height/width instead of height/width for gs-h|x="1" also further compressed CSS multi column rules (use .gs-# > .grid-stack-item instead of .grid-stack-# > .grid-stack-item )
    Open source →
  3. 8.1.07 May 2023
    Release notes2 sources agree
    • break: remove GridStackOptions.minWidth obsolete since 5.1, use oneColumnSize instead

    • optimize: CSS files now even 25% smaller (after being halfed in 8.0.0) by removing .grid-stack prefix for anything already gs based, and 3 digit rounding.

    • fix: #2275 setupDragIn() signature tweaks (HTMLElement | Document)

    • feat: #2205 added GridStackOptions.draggable.cancel for list of selectors that should prevent item dragging

    Open source →
  4. 8.0.130 Apr 2023
    Release notes2 sources agree
    • feat: #2275 setupDragIn() now can take an array or elements (in addition to selector string) and optional parent root (for shadow DOM support)

    • fix: #2234 Utils.getElements('1') (called by removeWidget() and others) now checks for digit 'selector' (becomes an id).

    • fix: #2213 destroy() now removes event handlers too

    • feat: #2292 ne nw resize handle

    • break: (meant to be in v8) removed GridStackOptions.dragInOptions since GridStack.setupDragIn() has it replaced since 4.0

    Open source →
  5. 8.0.029 Apr 2023
    Release notes2 sources agree
    • package is now ES2020 (TS exported files), webpack all.js still umd (better than commonjs for browsers), still have es5/ files unchanged (for now)

    • optimize #2243 removed gs-min|max_w|h attribute generated in CSS or written out as they are never used for rendering, only for initial load. This reduce our column/row CSS in half!

    • optimize: removed gs-w='1' and gs-h='1' dom attribute writing since we already have min-width/min-height set, no need to set more attributes.

    • optimize: remove 'ui-draggable' and 'ui-resizable' since wasn't used in CSS and we have the -disabled version when off (so we can use not(xyz-disabled) ).

    • add: GridStack.saveCB global callback for each item during save so app can insert any custom data before serializing it. save() can now be passed optional callback

    • move: GridStack.addRemoveCB is now global instead of grid option. load() can still be passed different optional callback

    • fix: addGrid() to handle passing an existing initialized grid already

    • break: GridStackOptions.subGrid -> GridStackOptions.subGridOpts . We now have GridStackWidget.subGridOpts vs GridStackNode.subGrid (subclass) rather than try to merge the two at runtime since very different types...

    • tons of improvements for Angular wrapper.

    Open source →
  6. 7.3.02 Apr 2023
    Release notes2 sources agree
    • feat #2229 support nonce for CSP. Thank you @jedwards1211

    • feat: support nested grids with Angular component demo. Thank you R. Blanken for supporting this.

    • fix #2206 load() with collision fix

    • fix #2232 autoPosition bug loading from DOM

    Open source →
  7. 7.2.32 Feb 2023
    Release notes2 sources agree
    • fix addWidget() to handle passing just {el} which was needed for Angular HMTL template demo

    • add opts.draggable.scroll back to disable scrolling. Thank you @VincentMolinie

    Open source →
  8. 7.2.216 Jan 2023
    Release notes2 sources agree
    • fix #2171 save() nested grid has extra nested children & options

    • regression for fix #2110: nested grids lost their styles causing wrong rendering when dragging to create sub nesting

    Open source →
  9. 7.2.114 Jan 2023
    Release notes2 sources agree
    • fix #2162 removing item from a grid (into another) will now call change if anything was also modified during the remove

    • fix #2110 custom GridStackOptions.itemClass now works when dragging from outside

    Open source →
  10. 7.2.08 Jan 2023
    Release notes2 sources agree
    • fix #1936 some styles left behind after a drag

    • remove #1842 incorrect doc/partial code on widget resizeHandles

    • doc #2033 resizestop is actually correct as we don't animate resize today

    • add - init() | initAll() will now load any listed children (what addGrid() already did)

    • add - GridStackOptions.addRemoveCB which is use by frameworks (eg Angular) to dynamically create their gridItem components instead of regular div with class

    Open source →
  11. 7.1.230 Dec 2022
    Release notes2 sources agree
    • fix #939 'prototype' undefined error for dd-gridstack.js

    • add #939 disable/enable are methods now recursive by default

    • add better GridStackEventHandlerCallback spelled out types

    • add We now have support for Angular Component wrappers out of the box included in the build, with docs and demo! Need help to do that for React and Vue.

    Open source →
  12. 7.1.113 Nov 2022
    Release notes2 sources agree
    • fix #939 editable elements focus (regression in v6). Thank you @Gezdy
    Open source →
  13. 7.1.023 Oct 2022
    Release notes2 sources agree
    • back to MIT license in package.json

    • add GridStackEngine.findEmptyPosition()

    • fix #2081 removeWidget() after it's gone from DOM

    • fix #1985 addWidget() or DOM read in single column mode will not adjust to multi column mode

    • fix #1975 oneColumnModeDomSort not respected when loading in 1 column

    Open source →
  14. 7.0.114 Oct 2022
    Release notes2 sources agree
    • fix #2073 SSR (server side rendering) isTouch issue (regression in v6)

    • fix - removing last item delete sub-grid that are not auto-generated (nested.html vs nested_advanced.html)

    Open source →
  15. 7.0.09 Oct 2022
    Release notes2 sources agree
    • add #1009 Create sub-grids on the fly, by dragging items completely over others (nest) vs partially (push) using new flag GridStackOptions.subGridDynamic=true . Thank you [StephanP] for sponsoring it. See advance Nested

    • add - ability to pause drag&drop collision until the user stops moving - see DDDragOpt.pause (used for creating nested grids on the fly based on gesture).

    • add #1943 you can now drag sub-grids into other sub-grids

    Open source →
  16. 6.0.39 Oct 2022
    Release notes2 sources agree
    • fix #2055 maxRow=1 resize outside (broke in 6.0.1)

    • fix #2054 Can't enter text in textarea/input (broke in v6)

    Open source →
  17. 6.0.223 Sept 2022
    Release notes2 sources agree
    • fix #2034 removeWidget() breaking resize handle feedback

    • fix #2043 when swapping shapes in maxRow grid, make sure we still check for 50% coverage

    Open source →
  18. 6.0.128 Aug 2022
    Release notes2 sources agree
    • fix float(val) to set on grid and engine, so save() will read it.

    • fix #2018 mouseover and React different behavior

    • fix getting nested grid resize handles while dragging child

    Open source →
  19. 6.0.021 Aug 2022
    Release notes2 sources agree
    • converted previous HTML5 draggable=true based code to simple Mouse Events and Touch mobile support for drag&Drop.

    • removed all jquery-ui related code, and D&D plugging as we only support native events now

    • alwaysShowResizeHandle now support 'mobile' which is the default, making it much easier (see doc)

    • changed commit() to be batchUpdate(false) to make it easier to turn batch on/off. updated doc. old API remains for now

    Open source →
  20. 5.1.116 Jun 2022
    Release notes2 sources agree
    • fix v5.1.0 regression #1973 DnD Snap to Animation
    Open source →
  21. 5.1.021 May 2022
    Release notes2 sources agree
    • add GridStack.registerEngine() to let user use their own custom layout engine subclass. Thank you [Thomas] for sponsoring it.

    • grid option minWidth is now oneColumnSize to make it clearer, but old field will still work (JS only) for a while

    • fix #1966 restore animation when dragging items

    • updated jqueryui to latest v1.13.1

    Open source →
  22. 5.0.010 Jan 2022
    Release notes2 sources agree
    • add #992 support dragging into and out of nested grids from parents! Thank you @arclogos132 for sponsoring it.

    • add #1910 new column:'auto' option to size nested grids to their parent grid item column count, keeping items the same size inside and outside. Thank you @arclogos132 for also sponsoring it.

    • fix #1902 nested.html: dragging between sub-grids show items clipped

    • fix #1558 dragging between vertical grids causes too much growth, not follow mouse.

    • fix #1912 no longer force rows for min-height

    • fix #1888 locks up with nested grid when 'column' is set to 1

    Open source →
  23. 4.4.124 Dec 2021
    Release notes2 sources agree
    • fix #1901 error regression for #1785 when re-loading with fewer objects
    Open source →
  24. 4.4.021 Dec 2021
    Release notes2 sources agree
    • add #1887 support for IE (new es5 folder) by @SmileLifeIven

    • fix #1785 overlapping items when switching column() and making edits. Thank you @radovanobal for sponsoring it.

    • fix #1890 unhandled exception when dragging fast between grids.

    Open source →
  25. 4.3.118 Oct 2021
    Release notes2 sources agree
    • fix #1868 prevent swap during resize

    • fix #1849 #1816 save highest resolution in 1 column mode

    • fix #1855 resize when padding is large vs cellHeight

    Open source →
  26. 4.3.015 Oct 2021
    Release notes2 sources agree
    • you can now swap items of different width if they are the same row/height. Thanks to spektrummedia for sponsoring it.

    • fix #1860 nested grid save inf loop fix

    • use latest dart-sass , updated comments

    Open source →
  27. 4.2.713 Sept 2021
    Release notes2 sources agree
    • fix #1817 Enable passing of DragEvent to gridstack dropped event. Thanks @onepartsam

    • fix #1835 Layout incorrectly restored when node has a minimum width. Thanks @hssm

    • fix #1794 addGrid() does not recognize rem cellHeightUnit

    Open source →
  28. 4.2.611 Jul 2021
    Release notes2 sources agree
    • fix #1784 removable:true working by itself (without needing acceptWidgets:true )

    • fix #1791 removed drag flicker and scroll issue. Thanks @nelsieborja

    • fix #1795 save(false) will no longer have .content field (removed existing one if present)

    • fix #1782 save(false, false) now correctly saves nested grids

    • fix #1793 save(false, true) followed by enable() throws error. we now have new Utils.cloneDeep()

    Open source →
  29. 4.2.531 May 2021
    Release notes2 sources agree
    • fix for website with JQ droppable('destroy') giving error
    Open source →
  30. 4.2.429 May 2021
    Release notes2 sources agree
    • fix #1760 removable:true working again (broke in 4.x)

    • fix #1761 staticGrid(false) will now enable drag in behavior (if set)

    • fix #1767 locked item can be user moved/resized again, just not pushed by other nodes (broke in 1.1.1)

    • fix #1764 destroy(false) can now re-init properly (doesn't force static grid)

    Open source →
  31. 4.2.38 May 2021
    Release notes2 sources agree
    • Utils.getScrollParent() -> getScrollElement() rename

    • fix #1745 digression on scrolling in v4.2.1. Thanks @Manfred-on-github for fixing your prev change.

    Open source →
  32. 4.2.223 Apr 2021
    Release notes2 sources agree
    • fix #1684 #1550 mac Safari H5 draggable broken in 4.0.1. Thanks @wurambo

    • fix #1562 mac Safari page scroll fix

    Open source →
  33. 4.2.118 Apr 2021
    Release notes2 sources agree
    • fix #1700 JQ nested grid drag fix broken in 4.0.3 (but much older underlying issue)

    • fix #1678 item gs-x:0 not animating fix

    • fix #1727 resize-scroll issue when grid is not at top of page. Thanks @Manfred-on-github

    • fix #1728 fix sizing from top/left sides

    Open source →
  34. 4.2.011 Apr 2021
    Release notes2 sources agree
    • fix #1704 scrollbar fix broken in 4.x

    • fix #1655 addWidget() while in 1 column now remembers original wanted width

    • add #1727 addWidget() now supports nested grids like init/addGrid() does.

    Open source →
  35. 4.1.07 Apr 2021
    Release notes2 sources agree
    • fix #219 fixing another 6 years old request we now automatically insert extra rows when dragging an item at the bottom below others to make it easier to insert below.

    • fix #1687 more fix for drag between 2 grids with row / maxRow broken in 4.x

    • fix export symbols .d.ts for gridstack-h5.js | gridstack-jq.js | gridstack-static.js

    • fix #1709 correct info for using JQ version and ES6 (tested in Angular app)

    Open source →
  36. 4.0.329 Mar 2021
    Release notes2 sources agree
    • fix #1693 load after init() broken in 4.x

    • fix #1687 drag between 2 grids with row / maxRow broken in 4.x

    • fix #1676 drag edge case in/out single grid without acceptWidgets fix broken in 4.x

    Open source →
  37. 4.0.228 Mar 2021
    Release notes2 sources agree
    • fix #1679 Resizable: {handles:'w/sw'} broken in 4.x

    • fix #1658 enableMove(T/F) not working correctly

    • fix helper: myFunction now working for H5 case for dragInOptions & setupDragIn() broken in 3.x

    • fix prevent addGrid() from creating nested div grid if container already is a '.grid-stack' div

    Open source →
  38. 4.0.120 Mar 2021
    Release notes2 sources agree
    • fix #1669 JQ resize broken in 4.x

    • fix #1661 serialization of nested grid

    Open source →
  39. 4.0.020 Mar 2021
    Release notes2 sources agree
    • fix #149 #1094 #1605 #1534 re-write of the collision code - fixing 6 years old most requested request

    • you can now swap items of the same size (vertical/horizontal) when grid is full, and is the default in float:false (top gravity) as it feels more natural. Could add Alt key for swap vs push behavior later.

    • Dragging up and down now behave the same (used to require push WAY down past to swap/append). Also much more efficient collision code.

    • handle mid point of dragged over items (>50%) rather than just a new row/column and check for the most covered item when multiple collide.

    • fix #393 #1612 #1578 re-write of the drag in/out code - fixing 5 years old bug

    • we now remove item when cursor leaves ( acceptWidgets case using dropout event) or shape is outside (re-using same method) and re-insert on cursor enter (since we only get dropover event). Should not be possible to have 2 placeholders which confuses the grids.

    • major re-write and cleanup of the drag in/out. Vars have been renamed and fully documented as I couldn't understand the legacy buggy code.

    • removed any over trash delay feedback as I don't see the point and could introduce race conditions.

    • fix 1617 FireFox DOM order issue. Thanks @marcel-necker

    • fix changing column # column(n) now resizes cellHeight:'auto' to keep square

    • add 1616 drag | resize events while dragging. Thanks @MrCorba

    • add 1637 GridStack.setupDragIn() so user can update external draggable after the grid has been created

    Open source →
  40. 3.3.03 Feb 2021
    Release notes2 sources agree
    • big re-write on how cellHeight() works. you can now call it at any time (not just grid init options) including switching to 'auto' or other modes on the fly.

    • fix cellHeight:auto now keeps cell square as window resizes (regressing from 2.x TS conversion). Utils.throttle() works better too (guaranteed to be called last event)

    • new cellHeight:initial which makes the cell squares initially, but doesn't change as windows resizes (better performance)

    • new grid option cellHeightThrottle (100ms) to control throttle of auto sizing triggers

    • fix 1600 height too small with cellHeight:auto loading in 1 column. Now detect we load at 1 column and size accordingly (default 'auto' could make big 700x700 cells, so explicit px might still be wanted)

    • fix 1538 loading nested into small size and sizing back up

    • fix 1604 nested grid resizing fix

    • fix 1599 resize from left side can move item right

    Open source →
  41. 3.2.026 Jan 2021
    Release notes2 sources agree
    • fix 1413 website & lib works on mobile. We now compile the latest v1.0.8 jquery.ui.touch-punch into the JQ version (only 2k) so mobile devices (android, iphone, ipad, ms surface, etc...) are supported out of the box. HTML5 version will require re-write to plain mousemove & mobile touchmove instead of drag events in a future release.

    • small optimizations (create placeholder content on the fly, moved more DD code into draggable class)

    Open source →
  42. 3.1.523 Jan 2021
    Release notes2 sources agree
    • fix 1572 column: N option now sets CSS class

    • fix 1571 don't allow drop when grid is full

    • fix 1570 easier to drag out/in from below

    • fix 1579 cellHeight() not updating CSS correctly

    • fix 1581 H5 draggable by actual div handle rather than entire item (let content respond to drag as well)

    Open source →
  43. 3.1.412 Jan 2021
    Release notes2 sources agree
    • fix 1557 fix no-drop cursor on windows when dragging within a default grid (no external drag in)

    • fix 1541 fix Safari H5 delay when dropping items

    Open source →
  44. 3.1.33 Jan 2021
    Release notes2 sources agree
    • fix 1540 Safari H5 drag&drop fix

    • fix 1535 use batchUpdate() around grid init to make sure gs-y attributes are respected.

    • fix 1545 disableMove() correctly prevents drag later (remove events and draggable attribute)

    • fix 1546 resize no longer delayed, which caused race conditions errors

    • fix 1001 resizing near bottom/top needs to auto-scroll/. thanks @hbcarlos !

    Open source →
  45. 3.1.28 Dec 2020
    Release notes2 sources agree
    • fix 1419 dragging into a fixed row grid works better (check if it will fit, else try to append, else won't insert) -- possible BREAK (unlikely you use engine directly)

    • engine constructor takes Options struct rather than spelling arguments (easier to extend/use)

    • canBePlacedWithRespectToHeight() -> willItFit() like grid method

    • fix 1330 maxW does not work as intended with resizable handle "w"

    • fix 1472 support all options for new dragged in widgets (read all gs-xyz attributes)

    • fix 1511 dragging any grid item content works

    • fix 1438 web-component fixes & grid with 0 size initially.

    Open source →
  46. 3.1.18 Dec 2020

    Nothing published for this version

  47. 3.1.04 Dec 2020
    Release notes2 sources agree
    • add new addGrid(parent, opts) to create a grid and load children instead of init() + load() , which is used by load() to supports nested grids creation. see nested.html demo.

    • save() will now work on nested grids, recursively saving info. added flag to also allow saving the current grid options + children (needed for nested grids) so you can now call new adddGrid() to re-create everything from JSON.

    • fix 1505 don't call movable() / resizable() on locked items error. thanks @infime

    • fix 1517 force typescript 3.6 as 3.7 has breaking change

    Open source →
  48. 3.0.029 Nov 2020
    Release notes2 sources agree
    • the big news is we finally have a native HTML5 drag&drop plugin (zero jquery)! Huge thanks to @rhlin for creating this in stealth mode. Read all about it in main doc.

    • we now have a React example, in addition to Vue - Angular is next!. thanks @eloparco

    • fix placeholder not having custom GridStackOptions.itemClass . thanks @pablosichert

    • fix 1484 dragging between 2 grids and back (regression in 2.0.1)

    • fix 1471 load() into 1 column mode doesn't resize back to 12 correctly

    • fix 1235 update(el, opts) re-write to take all GridStackWidget options (not just x,y,width,height) and do everything efficiently. Hiding locked() , move() , resize() , minWidth() , etc... as they just simply call update() which does all the constrain now as well!

    • del ddPlugin grid option as we only have one drag&drop plugin at runtime, which is defined by the include you use (HTML5 vs jquery vs none)

    • change attribute data-gs-min-width is now gs-min-w . We removed 'data-' from all attributes, and shorten 'width|height' to just 'w|h' to require less typing and more efficient (2k saved in .js alone!) 1491 1492

    • also GridStackWidget used in most API width|height|minWidth|minHeight|maxWidth|maxHeight are now shorter w|h|minW|minH|maxW|maxH as well 1493

    • **** see migrating to v3 ****

    Open source →
  49. 2.2.07 Nov 2020
    Release notes2 sources agree
    • add margin option now support multi values CSS format '5px 10px 0 20px' or '5em 10em'

    • add data-gs-static-grid attribute

    • fix 1435 class="ui-draggable-disabled ui-resizable-disabled" have been added back to static grid items, so existing CSS rule to style continue working

    • fix 1439 getting DOM element by id with number works (api that uses GridStackElement handle more string formats)

    • fix 1442 setting marginTop (or any 4 sides) to cause resize to break. Thanks @deadivan for suggested fix.

    Open source →
  50. 2.1.029 Oct 2020
    Release notes2 sources agree
    • fix grid static: true to no longer add any drag&drop (even disabled) which should speed things up, and setStatic(T/F) will now correctly add it back/delete for items that need it only. Also fixed JQ draggable warning if not initialized first 858

    • add addWidget(opt) now handles just passing a GridStackWidget which creates the default divs, simplifying your code. Old API still supported.

    • add save(saveContent = true) now lets you optionally save the HTML content in the node property, with load() restoring it 1418

    • add GridStackWidget.content now lets you add any HTML content when calling load()/save() or addWidget() 1418

    • add ColumnOptions to column(n, options) for multiple re-layout options, including 'none' that will preserve the x and width, until out of bound/overlap 1338 including a custom function for you to create the new layout 1332

    Open source →
  51. 2.0.26 Oct 2020
    Release notes2 sources agree
    • fix animate to not re-create CSS style each time (should be faster too) and made it default now since so much nicer. pass {animate: false} grid options if you want instant again 937

    • fix resizable: { handles: ...} forcing alwaysShowResizeHandle behavior 1373

    Open source →
  52. 2.0.127 Sept 2020
    Release notes2 sources agree
    • fix minWidth() , minHeight() , maxHeight() to set node value as well 1359

    • fix GridStackOptions spelling 1359

    • fix remove window resize event when grid.destroy() 1369

    • fix nested grid resize 1361

    • fix resize with cellHeight '6rem' '6em' not working 1356

    • fix preserve attributes (min/max/id/etc...) when dragging between grids 1367

    • fix 2 drop shadows when dragging between grids 393

    Open source →
  53. 2.0.08 Sept 2020
    Release notes2 sources agree
    • re-write to native Typescript, removing all JQuery from main code and API (drag&drop plugin still using jqueryui for now)

    • add getGridItems() to return list of HTML grid items

    • add {dragIn | dragInOptions} grid attributes to handle external drag&drop items

    • add save() and load() to serialize grids from JSON, saving all attributes (not just w,h,x,y) 1286

    • add margin to replace verticalMargin which affects both dimensions in code, rather than one in code the other in CSS. You can now have perfect square cells (default) 723

    • fix 1299 many columns round-off error

    • fix 1102 loose functionality when they are moved to a new grid

    • add optional params to removeWidget() to have quiet mode (no callbacks)

    • drop support for IE11 due to more compact ES6 output and newer TS code

    Open source →
  54. 2.0.0-rc34 Sept 2020pre-release

    Nothing published for this version

  55. 2.0.0-rc217 Aug 2020pre-release

    Nothing published for this version

  56. 2.0.0-rc11 Aug 2020pre-release

    Nothing published for this version

  57. 1.2.14 Sept 2020
    Release notes2 sources agree
    • fix 1341 Enable the UMD behavior for bundlers compatibility
    Open source →
  58. 1.2.01 Aug 2020
    Release notes2 sources agree
    • fix 1311 domAttr is not defined

    • adds styleInHead option to allow for selecting older behavior (adding STYLE element to HEAD element instead of parentNode)

    • update jquery to v3.5.1

    Open source →
  59. 1.1.217 May 2020
    Release notes2 sources agree
    • fix 1229 staticGrid no longer disable oneColumnMode

    • fix 1195 options broken with ember hash helper - thanks @btecu

    • fix 1250 don't remove item from another grid

    • fix 1261 init() clones passed options so second doesn't affect first one

    • fix 1276 addWidget() ignores data attributes

    Open source →
  60. 1.1.117 Mar 2020
    Release notes2 sources agree
    • fix 1187 IE support for CustomEvent polyfill - thanks @phil-blais

    • fix 1204 destroy drag&drop when removing node(s) instead of just disabling it.

    • fix 1181 Locked widgets are still moveable by other widgets.

    • fix 1217 If I set cellHeight to some vh, only first grid will take vh, rest will use px

    • include SASS source files to npm package again 1193

    Open source →