{
  "_copyright": "Copyright (c) 2026, Salesforce, Inc., All rights reserved. For full license text, see the LICENSE.txt file",
  "$schema": "https://slds.lightningdesignsystem.com/schemas/uif-system.v1.json",
  "apiVersion": "1.0.0",
  "name": "Textarea",
  "description": "Initialize textarea",
  "structure": {
    "name": "root",
    "restrict": [
      "div"
    ],
    "description": "Textarea container",
    "children": [
      {
        "name": "label",
        "restrict": [
          "label",
          "span"
        ],
        "description": "Textarea label. Renders as a label when interactive and as a span when readOnly.",
        "attributes": {
          "bound": {
            "for": {
              "prop": "textareaId"
            }
          },
          "static": {
            "class": "slds-form-element__label"
          }
        },
        "slot": {
          "name": "label",
          "required": true
        },
        "children": [
          {
            "name": "requiredIndicator",
            "restrict": [
              "abbr"
            ],
            "description": "Required field indicator rendered inside the label when the textarea is required.",
            "renderWhen": {
              "prop": "required",
              "eq": "true"
            },
            "attributes": {
              "static": {
                "title": "required",
                "aria-hidden": "true",
                "class": "slds-required"
              }
            }
          }
        ]
      },
      {
        "name": "textareaContainer",
        "restrict": [
          "div"
        ],
        "description": "Container for textarea",
        "children": [
          {
            "name": "textarea",
            "restrict": [
              "textarea"
            ],
            "description": "Initialize textarea",
            "renderWhen": {
              "prop": "readOnly",
              "eq": "false"
            },
            "attributes": {
              "bound": {
                "id": {
                  "prop": "textareaId",
                  "required": true
                },
                "name": {
                  "prop": "name"
                },
                "placeholder": {
                  "prop": "placeholder"
                },
                "disabled": {
                  "prop": "disabled"
                },
                "readonly": {
                  "prop": "readonly"
                },
                "required": {
                  "prop": "required"
                },
                "maxlength": {
                  "prop": "maxLength"
                },
                "minlength": {
                  "prop": "minLength"
                },
                "rows": {
                  "prop": "rows"
                },
                "aria-describedby": {
                  "prop": "ariaDescribedBy"
                }
              },
              "static": {
                "class": "slds-textarea"
              }
            }
          },
          {
            "name": "readOnlyContent",
            "restrict": [
              "div"
            ],
            "description": "Read-only display wrapper rendered in place of the textarea.",
            "renderWhen": {
              "prop": "readOnly",
              "eq": "true"
            },
            "children": [
              {
                "name": "paragraph",
                "restrict": [
                  "p"
                ],
                "description": "Paragraph holding the read-only text value.",
                "slot": {
                  "name": "readOnlyValue"
                }
              }
            ],
            "attributes": {
              "static": {
                "class": "slds-form-element__static"
              }
            }
          }
        ],
        "attributes": {
          "static": {
            "class": "slds-form-element__control"
          }
        },
        "modifiers": [
          {
            "name": "hasBottomBorder",
            "attribute": "class",
            "value": "slds-border_bottom",
            "description": "Adds a bottom border to the control wrapper. Applied when the textarea is rendered in its read-only form."
          }
        ]
      },
      {
        "name": "helpText",
        "restrict": [
          "div"
        ],
        "description": "Help text below textarea",
        "renderWhen": "slotFilled",
        "slot": {
          "name": "helpText"
        },
        "attributes": {
          "static": {
            "class": "slds-form-element__help"
          }
        }
      }
    ],
    "attributes": {
      "static": {
        "class": "slds-form-element"
      }
    }
  },
  "states": [
    {
      "name": "disabled",
      "type": "boolean",
      "aria": "aria-disabled",
      "description": "Whether the textarea is disabled"
    },
    {
      "name": "readonly",
      "type": "boolean",
      "aria": "aria-readonly",
      "description": "Whether the textarea is read-only"
    },
    {
      "name": "required",
      "type": "boolean",
      "aria": "aria-required",
      "description": "Whether the textarea is required"
    },
    {
      "name": "hasError",
      "type": "boolean",
      "description": "Whether the textarea has a validation error"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "label-association",
        "description": "Textarea must have an associated label via for/id when interactive."
      },
      {
        "id": "required-indicator-aria-hidden",
        "description": "The visual required indicator (asterisk) must be marked aria-hidden because requirement is already conveyed via aria-required on the textarea."
      }
    ]
  },
  "extensions": {
    "com.salesforce-ux": {
      "dateAdded": "2015-09-04",
      "genReady": false,
      "lbc": "lightning-textarea"
    }
  },
  "cssSource": "./textarea.css",
  "styleApi": {
    "status": "stable",
    "ready": true
  },
  "stateClasses": [
    {
      "state": "hasError",
      "class": "slds-has-error"
    }
  ]
}
