# Input

Text entry with labels, helper text and validation states.

## Installation

Download: /api/catalog/input/download

Ignition Perspective 8.3. In a development project, choose Designer > File > Import and select the ZIP. Preserve the view and style-class paths. Review resource conflicts before replacing anything.

Append stylesheet-snippet.css to Perspective Styles > stylesheet.css (enable Advanced Stylesheet). Preserve existing CSS. This supporting file is not imported automatically.

Add an Embedded View (ia.display.view), set props.path to Primitives/Input, and configure props.params using the contract below. Connect your own data in the host view. The package does not include live tags, page configuration or Gateway settings.

## Parameters

Types are inferred from saved defaults; directions come from native propConfig. These are not full schemas or validated ranges.

| Parameter | Type | Direction | Default |

| --- | --- | --- | --- |

| label | string | input | "Label" |

| value | string | input | "" |

| placeholder | string | input | "Placeholder" |

| hint | string | input | "" |

| error | string | input | "" |

| disabled | boolean | input | false |

| size | string | input | "default" |

| leadingIcon | string | input | "" |

| maxWidth | number | input | 320 |

## Embedded View usage

```json

{
  "type": "ia.display.view",
  "props": {
    "path": "Primitives/Input",
    "params": {
      "label": "Label",
      "value": "",
      "placeholder": "Placeholder",
      "hint": "",
      "error": "",
      "disabled": false,
      "size": "default",
      "leadingIcon": "",
      "maxWidth": 320
    },
    "useDefaultViewWidth": false,
    "useDefaultViewHeight": false
  }
}

```

## Verification

Source and archive hashes are checked. Designer import acceptance has not been completed for this archive; test in your development project before production.

## Files

### com.inductiveautomation.perspective/views/Primitives/Input/view.json

```json

{
  "custom": {},
  "params": {
    "label": "Label",
    "value": "",
    "placeholder": "Placeholder",
    "hint": "",
    "error": "",
    "disabled": false,
    "size": "default",
    "leadingIcon": "",
    "maxWidth": 320
  },
  "propConfig": {
    "params.label": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.value": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.placeholder": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.hint": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.error": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.disabled": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.size": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.leadingIcon": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.maxWidth": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "width": 320,
      "height": 80
    }
  },
  "root": {
    "type": "ia.container.flex",
    "version": 0,
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column",
      "justify": "flex-start",
      "alignItems": "stretch",
      "overflow": "hidden",
      "style": {
        "gap": "0px",
        "width": "100%",
        "maxWidth": "320px",
        "boxSizing": "border-box",
        "overflow": "hidden"
      }
    },
    "propConfig": {
      "props.style.maxWidth": {
        "binding": {
          "type": "expr",
          "config": {
            "expression": "toString({view.params.maxWidth}) + \"px\""
          }
        }
      }
    },
    "children": [
      {
        "type": "ia.display.label",
        "version": 0,
        "meta": {
          "name": "label"
        },
        "props": {
          "text": "Label",
          "style": {
            "classes": "vc/input-label",
            "overflow": "hidden"
          }
        },
        "position": {
          "grow": 0,
          "shrink": 0,
          "basis": "auto"
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "type": "property",
              "config": {
                "path": "view.params.label"
              }
            }
          },
          "meta.visible": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "len(trim(toString({view.params.label}))) > 0"
              }
            }
          }
        }
      },
      {
        "type": "ia.container.flex",
        "version": 0,
        "meta": {
          "name": "shell"
        },
        "props": {
          "direction": "row",
          "alignItems": "center",
          "justify": "flex-start",
          "overflow": "hidden",
          "style": {
            "classes": "vc/input-field",
            "gap": "8px",
            "width": "100%",
            "overflow": "hidden"
          }
        },
        "position": {
          "grow": 0,
          "shrink": 0,
          "basis": "auto"
        },
        "propConfig": {
          "props.style.classes": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "\"vc/input-field\" + if({view.params.size} = \"sm\", \" vc/input-field-sm\", \"\") + if(len(trim(toString({view.params.error}))) > 0, \" vc/input-field-error\", \"\") + if({view.params.disabled}, \" vc/input-field-disabled\", \"\")"
              }
            }
          },
          "props.style.height": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "if({view.params.size} = \"sm\", \"32px\", \"36px\")"
              }
            }
          },
          "props.style.minHeight": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "if({view.params.size} = \"sm\", \"32px\", \"36px\")"
              }
            }
          },
          "props.style.maxHeight": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "if({view.params.size} = \"sm\", \"32px\", \"36px\")"
              }
            }
          }
        },
        "children": [
          {
            "type": "ia.display.icon",
            "version": 0,
            "meta": {
              "name": "leading"
            },
            "props": {
              "path": "material/search",
              "style": {
                "classes": "vc/input-icon",
                "overflow": "hidden",
                "width": "16px",
                "height": "16px",
                "color": "#a1a1aa"
              }
            },
            "position": {
              "grow": 0,
              "shrink": 0,
              "basis": "16px"
            },
            "propConfig": {
              "props.path": {
                "binding": {
                  "type": "property",
                  "config": {
                    "path": "view.params.leadingIcon"
                  }
                }
              },
              "meta.visible": {
                "binding": {
                  "type": "expr",
                  "config": {
                    "expression": "len(trim(toString({view.params.leadingIcon}))) > 0"
                  }
                }
              }
            }
          },
          {
            "type": "ia.input.text-field",
            "version": 0,
            "meta": {
              "name": "field"
            },
            "props": {
              "text": "",
              "placeholder": "Placeholder",
              "enabled": true,
              "style": {
                "classes": "vc/input-control",
                "borderStyle": "none",
                "borderWidth": "0px",
                "backgroundColor": "transparent",
                "boxShadow": "none",
                "padding": "0px",
                "height": "100%",
                "overflow": "hidden"
              }
            },
            "position": {
              "grow": 1,
              "shrink": 1,
              "basis": "0%"
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "type": "property",
                  "config": {
                    "path": "view.params.value",
                    "bidirectional": true
                  }
                }
              },
              "props.placeholder": {
                "binding": {
                  "type": "property",
                  "config": {
                    "path": "view.params.placeholder"
                  }
                }
              },
              "props.enabled": {
                "binding": {
                  "type": "expr",
                  "config": {
                    "expression": "!{view.params.disabled}"
                  }
                }
              }
            }
          }
        ]
      },
      {
        "type": "ia.display.label",
        "version": 0,
        "meta": {
          "name": "hint"
        },
        "props": {
          "text": "",
          "style": {
            "classes": "vc/input-hint",
            "overflow": "hidden"
          }
        },
        "position": {
          "grow": 0,
          "shrink": 0,
          "basis": "auto"
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "if(len(trim(toString({view.params.error}))) > 0, {view.params.error}, {view.params.hint})"
              }
            }
          },
          "props.style.classes": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "if(len(trim(toString({view.params.error}))) > 0, \"vc/input-error\", \"vc/input-hint\")"
              }
            }
          },
          "meta.visible": {
            "binding": {
              "type": "expr",
              "config": {
                "expression": "len(trim(toString({view.params.error}))) > 0 || len(trim(toString({view.params.hint}))) > 0"
              }
            }
          }
        }
      }
    ]
  }
}


```

### com.inductiveautomation.perspective/views/Primitives/Input/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "view.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-label/style.json

```json

{
  "base": {
    "style": {
      "fontSize": "14px",
      "fontWeight": "500",
      "color": "#a1a1aa",
      "marginBottom": "6px",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-label/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-field/style.json

```json

{
  "base": {
    "style": {
      "display": "flex",
      "alignItems": "center",
      "gap": "8px",
      "height": "36px",
      "minHeight": "36px",
      "maxHeight": "36px",
      "width": "100%",
      "boxSizing": "border-box",
      "borderStyle": "solid",
      "borderWidth": "1px",
      "borderColor": "#3f3f46",
      "borderRadius": "6px",
      "paddingLeft": "12px",
      "paddingRight": "12px",
      "backgroundColor": "#18181b",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": [
    {
      "pseudo": "hover",
      "style": {
        "borderColor": "#52525b"
      },
      "mediaQueries": []
    }
  ]
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-field/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-field-sm/style.json

```json

{
  "base": {
    "style": {
      "height": "32px",
      "minHeight": "32px",
      "maxHeight": "32px",
      "paddingLeft": "10px",
      "paddingRight": "10px",
      "fontSize": "12px"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-field-sm/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-field-error/style.json

```json

{
  "base": {
    "style": {
      "borderColor": "#dc2626",
      "borderStyle": "solid",
      "borderWidth": "1px"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-field-error/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-field-disabled/style.json

```json

{
  "base": {
    "style": {
      "opacity": "0.5"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-field-disabled/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-icon/style.json

```json

{
  "base": {
    "style": {
      "color": "#a1a1aa",
      "width": "16px",
      "height": "16px",
      "minWidth": "16px",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-icon/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-control/style.json

```json

{
  "base": {
    "style": {
      "backgroundColor": "transparent",
      "borderStyle": "none",
      "borderWidth": "0px",
      "boxShadow": "none",
      "color": "#fafafa",
      "fontSize": "14px",
      "fontWeight": "400",
      "padding": "0px",
      "height": "100%",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": [
    {
      "pseudo": "focus",
      "style": {
        "borderStyle": "none",
        "boxShadow": "none",
        "outlineWidth": "0px"
      },
      "mediaQueries": []
    }
  ]
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-control/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-hint/style.json

```json

{
  "base": {
    "style": {
      "fontSize": "12px",
      "color": "#a1a1aa",
      "marginTop": "4px",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-hint/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### com.inductiveautomation.perspective/style-classes/vc/input-error/style.json

```json

{
  "base": {
    "style": {
      "fontSize": "12px",
      "color": "#f87171",
      "marginTop": "4px",
      "overflow": "hidden"
    },
    "mediaQueries": []
  },
  "variants": []
}


```

### com.inductiveautomation.perspective/style-classes/vc/input-error/resource.json

```json

{
  "scope": "G",
  "version": 1,
  "restricted": false,
  "overridable": true,
  "files": [
    "style.json"
  ]
}

```

### stylesheet-snippet.css

```css


.psc-vc-lab-page .psc-vc\/input-control, .psc-vc-lab-component .psc-vc\/input-control, .psc-vc-lab-popup .psc-vc\/input-control{height:100%;min-height:0;line-height:normal;padding:0!important}
.psc-vc-lab-page .psc-vc\/input-field, .psc-vc-lab-component .psc-vc\/input-field, .psc-vc-lab-popup .psc-vc\/input-field{background:var(--lab-surface);color:var(--lab-text);border-color:var(--lab-line);align-items:center}
.psc-vc-lab-page [class~="psc-vc-lab-preview"] .psc-vc\/input-field, .psc-vc-lab-component .psc-vc\/input-field{
  min-height:36px!important;
  border-radius:8px!important;
  transition:border-color 150ms var(--vc-ui-ease),box-shadow 150ms var(--vc-ui-ease),background-color 150ms var(--vc-ui-ease)!important;
}
.psc-vc-lab-page [class~="psc-vc-lab-preview"] .psc-vc\/input-field:focus-within, .psc-vc-lab-component .psc-vc\/input-field:focus-within{
  border-color:#71717a!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.06)!important;
}
@media (prefers-reduced-motion:reduce){
  .psc-vc-lab-component .psc-vc\/input-field{
    transition:background-color 0.01ms linear,border-color 0.01ms linear,color 0.01ms linear,opacity 0.01ms linear!important;
  }
}
.psc-vc\/input-icon { color: #d4a84f !important; width: 16px !important; height: 16px !important; flex: 0 0 16px !important; }

```