gridstack_add_widget
Add a new widget to a dashboard grid with customizable position, size, and behavior settings for building dynamic layouts.
Instructions
Add a new widget to the grid
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| widget | Yes | Widget configuration | |
| triggerAddEvent | No | Trigger 'added' event |
Input Schema (JSON Schema)
{
"properties": {
"triggerAddEvent": {
"default": true,
"description": "Trigger 'added' event",
"type": "boolean"
},
"widget": {
"description": "Widget configuration",
"properties": {
"autoPosition": {
"description": "Auto-position widget",
"type": "boolean"
},
"content": {
"description": "Widget HTML content",
"type": "string"
},
"h": {
"description": "Height in rows",
"type": "number"
},
"id": {
"description": "Unique widget identifier",
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"locked": {
"description": "Lock widget position/size",
"type": "boolean"
},
"maxH": {
"description": "Maximum height",
"type": "number"
},
"maxW": {
"description": "Maximum width",
"type": "number"
},
"minH": {
"description": "Minimum height",
"type": "number"
},
"minW": {
"description": "Minimum width",
"type": "number"
},
"noMove": {
"description": "Disable moving",
"type": "boolean"
},
"noResize": {
"description": "Disable resizing",
"type": "boolean"
},
"resizeToContent": {
"description": "Resize to content",
"type": "boolean"
},
"w": {
"description": "Width in columns",
"type": "number"
},
"x": {
"description": "X position",
"type": "number"
},
"y": {
"description": "Y position",
"type": "number"
}
},
"type": "object"
}
},
"required": [
"widget"
],
"type": "object"
}