# disabled

**Optional**

**Type:** `boolean`

**Default**: `false`

Conditionally disable the UI component to prevent the user from interacting with it. In this state, the UI component is visually greyed out.

You can return the value from a [JS/TS function](https://docs.journeyapps.com/reference/app-features/calling-js-functions-from-xml), e.g. `disabled="$:isDisabled()"`.

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

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

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

<text-input bind="plain_text" label="Add-on" disabled="true" placeholder="Not available"/>
```

{% endcode %}

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