{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "label": {
      "description": "Override the field label",
      "examples": [
        "My label"
      ],
      "type": "string",
      "markdownDescription": "Override the field label\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "hideLabel": {
      "description": "Hide the field label",
      "type": "boolean",
      "markdownDescription": "Hide the field label\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "placeholder": {
      "description": "Placeholder text shown inside the input when empty",
      "examples": [
        "Search..."
      ],
      "type": "string",
      "markdownDescription": "Placeholder text shown inside the input when empty\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "readonly": {
      "description": "Render the field in read-only mode",
      "type": "boolean",
      "markdownDescription": "Render the field in read-only mode\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "disabled": {
      "description": "Always render the input disabled",
      "type": "boolean",
      "markdownDescription": "Always render the input disabled\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "errorMessage": {
      "description": "Replace the validation error text shown under the input",
      "examples": [
        "Please fill this in"
      ],
      "type": "string",
      "markdownDescription": "Replace the validation error text shown under the input\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "disabledWhen": {
      "description": "Disable the input when the condition matches another field",
      "examples": [
        {
          "field": "id",
          "exists": true
        }
      ],
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "description": "The other column id whose value is evaluated for the condition.",
          "markdownDescription": "The other column id whose value is evaluated for the condition.\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
        },
        "eq": {
          "description": "Show/hide/disable when the field value equals this value.",
          "markdownDescription": "Show/hide/disable when the field value equals this value.\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
        },
        "neq": {
          "description": "Show/hide/disable when the field value does NOT equal this value.",
          "markdownDescription": "Show/hide/disable when the field value does NOT equal this value.\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
        },
        "exists": {
          "description": "When true, show/hide/disable when the field has a non-empty value.",
          "type": "boolean",
          "markdownDescription": "When true, show/hide/disable when the field has a non-empty value.\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
        },
        "notExists": {
          "description": "When true, show/hide/disable when the field has no value.",
          "type": "boolean",
          "markdownDescription": "When true, show/hide/disable when the field has no value.\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
        }
      },
      "required": [
        "field"
      ],
      "markdownDescription": "Disable the input when the condition matches another field\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "colspan": {
      "description": "Grid column span (1–12)",
      "examples": [
        6,
        12
      ],
      "type": "number",
      "markdownDescription": "Grid column span (1–12)\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "width": {
      "description": "Named width (xs, sm, md, lg, xl, full) or any CSS value",
      "examples": [
        "md",
        "240px"
      ],
      "type": "string",
      "markdownDescription": "Named width (xs, sm, md, lg, xl, full) or any CSS value\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "styles": {
      "description": "Inline CSS style object applied to the field wrapper",
      "examples": [
        {
          "color": "red"
        }
      ],
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "markdownDescription": "Inline CSS style object applied to the field wrapper\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "customRender": {
      "description": "Name of a globally registered Vue component to render instead of the default input",
      "examples": [
        "MyCustomInput"
      ],
      "type": "string",
      "markdownDescription": "Name of a globally registered Vue component to render instead of the default input\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "options": {
      "description": "Array of option items rendered as toggle buttons",
      "examples": [
        [
          {
            "label": "Yes",
            "value": true
          },
          {
            "label": "No",
            "value": false
          }
        ]
      ],
      "type": "array",
      "items": {},
      "markdownDescription": "Array of option items rendered as toggle buttons\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "values": {
      "description": "Alias for options (deprecated — prefer options)",
      "deprecated": true,
      "type": "array",
      "items": {},
      "markdownDescription": "Alias for options (deprecated — prefer options)\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "labelKey": {
      "description": "Object key used as the button label",
      "examples": [
        "label"
      ],
      "type": "string",
      "markdownDescription": "Object key used as the button label\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "valueKey": {
      "description": "Object key used as the stored value",
      "examples": [
        "value"
      ],
      "type": "string",
      "markdownDescription": "Object key used as the stored value\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "storeValue": {
      "description": "Store option[valueKey] instead of the whole option object",
      "type": "boolean",
      "markdownDescription": "Store option[valueKey] instead of the whole option object\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "clearable": {
      "default": true,
      "description": "Clicking the active button again clears the value",
      "type": "boolean",
      "markdownDescription": "Clicking the active button again clears the value\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "color": {
      "default": "primary",
      "description": "Color token applied to the active button",
      "examples": [
        "primary",
        "secondary"
      ],
      "type": "string",
      "markdownDescription": "Color token applied to the active button\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    },
    "size": {
      "default": "sm",
      "description": "Size token for the buttons",
      "examples": [
        "sm",
        "md",
        "lg"
      ],
      "type": "string",
      "markdownDescription": "Size token for the buttons\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
    }
  },
  "additionalProperties": {},
  "title": "Crouton fieldInput options: toggle",
  "description": "Options for the toggle button-group control",
  "$id": "https://ghentcdh.github.io/crouton/schema/v1/toggle.field-input.schema.json",
  "markdownDescription": "Options for the toggle button-group control\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/toggle)"
}
