Skip to main content
Checkbox input component.
{
  "type": "object",
  "properties": {
    "type": {
      "const": "Checkbox",
      "default": "Checkbox",
      "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."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "State key for reactive binding. Auto-generated if omitted."
    },
    "value": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ],
      "default": false,
      "description": "Whether checkbox is checked"
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "Label text"
    },
    "disabled": {
      "default": false,
      "description": "Whether checkbox is disabled",
      "type": "boolean"
    },
    "required": {
      "default": false,
      "description": "Whether checkbox is required",
      "type": "boolean"
    },
    "onChange": {
      "$ref": "Action",
      "description": "Action(s) to execute when checked state changes",
      "default": null
    }
  },
  "required": [
    "type"
  ]
}