# Conditional Visibility

Conditional Visibility allows you to **dynamically show/hide** a UI component based on a rule.&#x20;

To enable it, you'll have to write a formula in the "Conditional visibility" box.

{% hint style="warning" %}
**You don't have to** write an "IF" expression to make it work. Simply `EQ(A, B)`will make the field visible when the variables meet the condition (A=B) and invisible when the opposite is true (under the hood it will return logical "1" and "0" correspondingly)
{% endhint %}

If the conditional visibility was enabled for a specific UI component AND the condition **is not** met, you'll see **the "eye" sign** in front of the component:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FPmhcxRyR6MW838rwCnI2%2Fgncvyu.png?alt=media\&token=14fdd1fc-ecac-4fab-b1c6-7c3ab3e61d85)

Here's an example of how conditional visibility works with static values:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2Fm60CNEcFgqxaoiVDUpTw%2Ffxjgyn.gif?alt=media\&token=40f28ca8-30ea-4829-b6e9-55c978dfa9b0)

**Static values** are more suited for demonstrating how conditional visibility works when the real use-cases most of the time involve **dynamic values**.

To use a **dynamic value**, delete one of the values in the formula (doesn't matter which one):&#x20;

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FWW10pjBFYNg1Rx79qukm%2Fxdntcfhvy.png?alt=media\&token=46fdea40-a2ba-4183-9130-37bd463f7fa5)

And replace it with the reference to the dynamic value. In our example, we've added to a canvas a new UI component: `Dynamic value` input **(1)** that may receive any value. After we've added it, it automatically appears in the modal window where we can reference it **(2)**.

{% hint style="info" %}
Learn more about **binding and referencing** dynamic values in the [Values section](https://docs.jetadmin.io/user-guide/binding-and-values/parameters)
{% endhint %}

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FHf9xFqonqgBQaR35PAY1%2Fzrhxdct.png?alt=media\&token=a7965833-6ca3-40d8-a324-6696d5b42589)

After mapping the variable from the "Conditional visibility" formula onto the "Dynamic value" input component, the left component will be visible/invisible **based on the value** in the right input component:

![](https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2F1tS6m1xVSGlCb7IESfQM%2Fdnxtcfy.gif?alt=media\&token=860a6395-e746-4191-a23b-fe309febc57c)

Not only can you fetch dynamic values from the "Input" UI components, but also "**User properties**" such as `email`, or values from specific fields from **selected rows** in the "Table" UI component.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jetadmin.io/user-guide/components-visibility/conditional-visibility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
