{
  "$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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
        },
        "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/relation)"
        },
        "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/relation)"
        },
        "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/relation)"
        },
        "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/relation)"
        }
      },
      "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/relation)"
    },
    "colspan": {
      "default": 12,
      "description": "Grid column span (1–12); defaults to 12 for relation controls",
      "examples": [
        12,
        6
      ],
      "type": "number",
      "markdownDescription": "Grid column span (1–12); defaults to 12 for relation controls\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "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/relation)"
    },
    "sort": {
      "description": "Field to sort related records by",
      "examples": [
        "name",
        "createdAt"
      ],
      "type": "string",
      "markdownDescription": "Field to sort related records by\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    },
    "sortDir": {
      "description": "Sort direction",
      "default": "asc",
      "examples": [
        "asc",
        "desc"
      ],
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ],
      "markdownDescription": "Sort direction\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    },
    "direction": {
      "description": "CSS flex direction for the button layout",
      "examples": [
        "row",
        "column"
      ],
      "type": "string",
      "markdownDescription": "CSS flex direction for the button layout\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    },
    "displayKey": {
      "description": "Key used as the display label for related records",
      "examples": [
        "name",
        "title"
      ],
      "type": "string",
      "markdownDescription": "Key used as the display label for related records\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    },
    "resource": {
      "description": "Path to the related resource.json",
      "examples": [
        "./author.resource.json"
      ],
      "type": "string",
      "markdownDescription": "Path to the related resource.json\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
    }
  },
  "additionalProperties": {},
  "title": "Crouton fieldInput options: relation",
  "description": "Options for the sub-resource relation control",
  "$id": "https://ghentcdh.github.io/crouton/schema/v1/relation.field-input.schema.json",
  "markdownDescription": "Options for the sub-resource relation control\n\n[Docs](https://ghentcdh.github.io/crouton/guide/2.resources/field-inputs/relation)"
}
