{
"type": "object",
"properties": {
"type": {
"const": "Switch",
"default": "Switch",
"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 switch is on"
},
"label": {
"type": [
"string",
"null"
],
"default": null,
"description": "Label text"
},
"size": {
"default": "default",
"description": "Switch size (sm, default)",
"enum": [
"sm",
"default"
],
"type": "string"
},
"disabled": {
"default": false,
"description": "Whether switch is disabled",
"type": "boolean"
},
"required": {
"default": false,
"description": "Whether switch is required",
"type": "boolean"
},
"onChange": {
"$ref": "Action",
"description": "Action(s) to execute when toggled",
"default": null
}
},
"required": [
"type"
]
}