You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dash_dynamic_grid_layout/dash_dynamic_grid_layout.md
+44-19Lines changed: 44 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,20 @@ icon: uim:grid
12
12
13
13
Dash Dynamic Grid Layout is a Dash component library that provides a flexible grid layout system for arranging and moving components within a Dash application.
14
14
15
+
Special thanks to [BSd3v](https://github.com/BSd3v) for contributing the improvements and bug fixes making this a much more polished project.
16
+
15
17
.. exec::docs.dash_dynamic_grid_layout.example
16
18
:code: false
19
+
17
20
## Features
18
21
19
22
- Drag-and-drop functionality for rearranging components
20
23
- Resizable grid items
21
24
- Customizable layout with responsive breakpoints
22
25
- Option to add or remove items dynamically
23
26
- Customizable drag handles for each item
27
+
- Persistence of component state
28
+
- Local, memory, or session storage for persistence
24
29
25
30
```bash
26
31
pip install dash-dynamic-grid-layout
@@ -34,31 +39,51 @@ Here's a basic example of how to use the DashGridLayout component:
| compactType | string | 'vertical' | Compaction type. Can be 'vertical', 'horizontal', or null |
47
-
| showRemoveButton | bool | True | Whether to show remove buttons for grid items |
48
-
| showResizeHandles| bool | True | Whether to show resize handles for grid items |
45
+
DashGridLayout is a flexible grid layout system for arranging and moving components within a Dash application. These are the properties available for the DashGridLayout component:
| style | object | - | Inline styles for the grid layout. |
54
+
| itemCount | number | - | The number of items in the grid. |
55
+
| itemToRemove | any | '' | The item in the grid that should be removed when triggered. |
56
+
| compactType | string | 'vertical' | Compaction type. Can be 'vertical', 'horizontal', or null. |
57
+
| showRemoveButton | boolean | true | Whether to show remove buttons for grid items. |
58
+
| showResizeHandles | boolean | true | Whether to show resize handles for grid items. |
59
+
| persistence | boolean | - | Whether to persist the component's state. |
60
+
| persisted_props | array |['itemLayout']| List of props to persist. |
61
+
| persistence_type | string | 'local' | Type of persistence. Can be 'local', 'memory', or 'session'. |
62
+
| items | array |[]| List of items to be rendered in the grid. |
63
+
| itemLayout | array |[]| Layout configuration for each item. Each item should be an object with shape {i: string, x: number, y: number, w: number, h: number}. |
64
+
| currentLayout | array |[]| The current layout of the grid items. Each item should be an object with shape {i: string, x: number, y: number, w: number, h: number}. |
| children | node | - | The content to be wrapped and made draggable |
55
-
| handleBackground | string | "rgb(85,85,85)"| Background color of the drag handle |
56
-
| handleColor | string | "white" | Text color of the drag handle |
57
-
| handleText | string | "Drag here" | Text to display in the drag handle |
76
+
DraggableWrapper is a component that wraps other components and makes them draggable. These are the properties available for the DraggableWrapper component:
0 commit comments