# label

**Optional**

**Type:** `string` (static text, a [format string](https://docs.journeyapps.com/reference/app-features/xml-format-strings) or the return value of a [JS/TS function](https://docs.journeyapps.com/reference/app-features/calling-js-functions-from-xml))

**Default**: Unset | data model field label

Text to display above the component. In the case of buttons, this text will display inside the button.

#### Example - `label` on a `text-input`

{% code title="main.view\.xml" %}

```xml
<var name="job_name" type="text"/>

<text-input bind="job_name" label="Job name" />
```

{% endcode %}

![](https://2865107717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9TCHLR67eLHBOjPvHhud%2Fuploads%2Fgit-blob-dd5595f4c4c4c32e6bcfe36f7b1fdd166eb58b1d%2Ftext-input-label.png?alt=media)
