gridstack_init
Initialize a GridStack instance to create dynamic dashboard layouts with drag-and-drop widgets, customizable grid options, and responsive design capabilities.
Instructions
Initialize a new GridStack instance with specified options
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | CSS selector for the grid container element | .grid-stack |
| options | No | GridStack initialization options |
Input Schema (JSON Schema)
{
"properties": {
"options": {
"description": "GridStack initialization options",
"properties": {
"acceptWidgets": {
"description": "Accept widgets from other grids or external elements",
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"alwaysShowResizeHandle": {
"description": "Always show resize handles",
"type": "boolean"
},
"animate": {
"description": "Enable animations",
"type": "boolean"
},
"auto": {
"description": "Auto-position widgets",
"type": "boolean"
},
"cellHeight": {
"description": "Cell height (px, 'auto', 'initial', CSS units)",
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"cellHeightThrottle": {
"description": "Throttle time for cellHeight='auto' (ms)",
"type": "number"
},
"column": {
"description": "Number of columns or 'auto' for nested grids",
"oneOf": [
{
"type": "number"
},
{
"enum": [
"auto"
],
"type": "string"
}
]
},
"disableDrag": {
"description": "Disable dragging of widgets",
"type": "boolean"
},
"disableResize": {
"description": "Disable resizing of widgets",
"type": "boolean"
},
"float": {
"description": "Enable floating widgets",
"type": "boolean"
},
"handle": {
"description": "Draggable handle selector",
"type": "string"
},
"margin": {
"description": "Gap between grid items (px or CSS units)",
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"maxRow": {
"description": "Maximum number of rows",
"type": "number"
},
"minRow": {
"description": "Minimum number of rows",
"type": "number"
},
"removable": {
"description": "Allow widgets to be removed by dragging out",
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"rtl": {
"description": "Right-to-left support",
"type": "boolean"
},
"staticGrid": {
"description": "Make grid static (no drag/resize)",
"type": "boolean"
}
},
"type": "object"
},
"selector": {
"default": ".grid-stack",
"description": "CSS selector for the grid container element",
"type": "string"
}
},
"type": "object"
}