Skip to main content
Responsive CSS grid container.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Grid",
      "default": "Grid",
      "type": "string"
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "HTML id attribute for CSS targeting. Applied to the outermost element."
    },
    "cssClass": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS/Tailwind classes for styling. Accepts a Responsive() for breakpoint-aware classes."
    },
    "children": {
      "type": "array",
      "items": {
        "$ref": "Component"
      }
    },
    "let": {
      "additionalProperties": true,
      "type": [
        "object",
        "null"
      ],
      "default": null,
      "description": "Scoped bindings available to children. Values are template strings."
    },
    "columns": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        },
        {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "columnTemplate": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "CSS grid-template-columns value for custom column widths."
    },
    "minColumnWidth": {
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "gap": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "maxItems": 2,
          "minItems": 2,
          "prefixItems": [
            {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            }
          ],
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "align": {
      "enum": [
        "start",
        "center",
        "end",
        "stretch",
        "baseline"
      ],
      "type": [
        "string",
        "null"
      ],
      "default": null
    },
    "justify": {
      "enum": [
        "start",
        "center",
        "end",
        "between",
        "around",
        "evenly",
        "stretch"
      ],
      "type": [
        "string",
        "null"
      ],
      "default": null
    }
  },
  "required": [
    "type"
  ]
}