# Conditional Visibility

Set conditional visibility to show different widgets, buttons, or tabs to different users based on User roles, the record information, or data in a specific field.

Set conditional visibility on:

* Widgets on detail layouts or create layouts
* Tabs
* Action Buttons
* Fields

## Set Conditional Visibility for Widgets <a href="#h_01h1q7080n93e2vyfmbkgernx9" id="h_01h1q7080n93e2vyfmbkgernx9"></a>

Widgets can be placed on Custom pages or Detail Layouts.

1. Select **Edit Layout**
2. Select the widget
3. Select **Conditional Visibility**
4. Set your filters

![](https://support.stackerhq.com/hc/article_attachments/17156459202579)

**Note**

At this time conditional visibility can only be set to User roles on Custom pages.

## Set Conditional Visibility for Tabs <a href="#h_01h1q70kyvp9qb4gpjjy3y88ht" id="h_01h1q70kyvp9qb4gpjjy3y88ht"></a>

Page tabs can be set on Detail Layouts.

1. Select **Edit Layout**
2. Select **Tabs**
3. Toggle on the tab
4. Select the Eye icon
5. Set your filters

![](https://support.stackerhq.com/hc/article_attachments/17156581812115)

## Set Conditional Visibility for Action Buttons <a href="#h_01h9ttacpchksfv38dbezsw6th" id="h_01h9ttacpchksfv38dbezsw6th"></a>

Action buttons can be created on List layouts or Detail Layouts.

1. Select **Edit Layout**
2. Select **Action**
3. Toggle on the action
4. Select the Eye icon
5. Set your filters

![](https://support.stackerhq.com/hc/article_attachments/17157035885587)

## Set Conditional Visibility for Fields <a href="#id-01h9ttay9ma84revp5m8xwka5c" id="id-01h9ttay9ma84revp5m8xwka5c"></a>

Set conditional visibility for individual fields on detail layouts.

1. Select **Edit Layout**
2. Toggle on the field
3. Select the Eye icon
4. Set your filters

![](https://support.stackerhq.com/hc/article_attachments/20487527108883)

{% hint style="info" %}
**Tip**

Preview as a user to test your conditional visibility conditions
{% endhint %}


---

# 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.stackerhq.com/stacker-classic/permissions-and-security/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.
