---
schema_version: "1"
id: 63eb7a3d03486b016d19d5c71d70129561d2916a6f13e2d61fd3a40368a6d9e3
title: Visibility Rules on Lightning Pages
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/lightning_page_components_visibility.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.lightning_page_components_visibility.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8c899f8bfc2f48130d586d298327279a5df96f51299c0a844ce7894635fed4a9
description: Control when a component appears on a Lightning page by adding filter conditions and logic to its properties in the Lightning App Builder. For example, you can construct a filter that causes a rich text component on an opportunity page to display when the opportunity’s amount is greater than or equal to US$1 million.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Visibility Rules on Lightning Pages

Control when a component appears on a Lightning page by adding filter conditions and logic to its properties in the Lightning App Builder. For example, you can construct a filter that causes a rich text component on an opportunity page to display when the opportunity’s amount is greater than or equal to US$1 million.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
      <colgroup>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Lightning App Builder available in: Salesforce Classic and Lightning
            Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Lightning pages available in: Lightning Experience and the Salesforce mobile
            app</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p style="margin-bottom:0;">Available in: <strong>Group</strong>
              <strong>Essentials</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>,
              <strong>Unlimited</strong>, and <strong>Developer</strong> Editions
            </p>
          </td>

        </tr>
      </tbody>
    </table>

Visibility properties appear when you select a component on a record, app, or Home page in the Lightning App Builder or on a field on a Dynamic Forms-enabled record page. You can also set visibility conditions to dynamically show or hide an individual tab in the Tabs component. This behavior applies to standard components, custom components, and components from AppExchange. No need to do anything to your custom components. The Lightning App Builder handles all of it.

On record pages, you can filter on record fields or advanced fields, such as fields from related objects or from a global object like User. Field values in visibility filters can’t span more than five fields. For example, `Record.Account.Owner.Manager.Manager.Manager.LastName` has six spans, so it isn’t supported.

![Component visibility filters](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/lab_component_visibility_sample.png)

App and Home pages aren’t associated with an object, so the filters you can use are limited to other contexts, such as User, User Permission, or Device. But that doesn’t mean that they’re less powerful.

If you don’t define a filter, the component displays on the Lightning page as usual. When you define one or more filters and set the filter logic for a component, it’s hidden until the filter logic criteria are met.

In the Lightning App Builder, items that have at least one filter assigned are indicated with an icon (![Component visibility icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/lab_visibility_rule_indicator_icon.png)).

## Visibility Rules on Dynamic Forms Fields and Field Sections

You can make your Lightning record pages even more dynamic by setting visibility filters on Field and Field Section components. For example, you can have a field or set of fields hidden until a person with a certain profile, permission, or viewing on a certain device visits the page.

Be careful when setting up visibility rules on multiple components in the same region. If your rules cause all the components in a region to be invisible at run time, the region is empty.

If a field is set to Required in the Lightning App Builder, and it’s hidden by a visibility rule at run time, users can save the record even if that field isn't populated.

Visibility rules on fields are respected in the edit, clone, inline edit, and new record screens. Component visibility rules on field sections behave differently than they do on fields. Visibility rules on fields are assessed dynamically. Changes a user makes while editing a record can make fields appear and disappear as visibility rules are evaluated. Visibility rules on field sections aren’t dynamic and don’t react to what a user does while editing. Field section visibility rules are evaluated only after the record is saved.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note Field and Field Section components are supported on desktop only. Therefore, the visibility rules you set on them are respected only in the desktop view, not on mobile. However, Dynamic Forms on Mobile gives your mobile users the same experience that your desktop users have. To avoid this issue, from Salesforce Mobile App Setup, enable **Dynamic Forms on Mobile**.

## Component Visibility Based on Form Factor

With a filter using the Device context, you can set a component to display exclusively when its page is viewed in a specific experience, such as a phone or a desktop.

![App page list view component restricted to mobile](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/lab_component_visibility_formfactor.png)

Custom Lightning components can also be set to support different form factors. For Lightning web components, see [Configure Your Component for Different Form Factors](https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_config_form_factors). For Aura components, see [Aura Component Bundle Design Resources](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_design_files.htm).

## Supported Objects, Fields, Field Types, and Operators

Two objects aren’t supported for visibility filters: ProcessInstanceStep and ProcessInstanceWorkItem.

On record pages, visibility filters rely on the data captured in fields associated with the page’s object. Not all fields, field types, and operators are supported.

These field types are supported:

- String type fields: Autonumber, Currency, Email, Number, Percent, Phone, Text, Text Area, URL
- ID
- Checkbox (boolean)
- Geolocation
- Picklist
- Formula fields that resolve to one of these preceding types
- Roll-up summary fields that resolve to one of these preceding types
- Lookup fields are supported, however parent lookup fields on Dynamic Forms-enabled pages aren't supported

These operators are supported.

- CONTAINS
- \= and == (Equal)
- <> or != (Not Equal)
- \> (Greater Than)
- \>= (Greater Than or Equal)
- < (Less Than)
- <= (Less Than or Equal)

#### See Also

- [Formula Operators and Functions by Context](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&release=264.0.0&type=5 "Use these operators and functions when building formulas. All functions are available everywhere that you can include a formula, such as formula fields, validation rules, approval processes, and workflow rules, unless otherwise specified.")
- [Standard Lightning Page Components](https://help.salesforce.com/s/articleView?id=platform.lightning_page_components.htm&release=264.0.0&type=5 "Standard components are Lightning components built by Salesforce. Several standard components are available when creating Lightning pages.")
- [Dynamic Forms and Mobile Using the Record Detail - Mobile Component](https://help.salesforce.com/s/articleView?id=platform.dynamic_forms_mobile.htm&release=264.0.0&type=5 "The Dynamic Forms Field Section component and the Field components that go inside were previously only available on desktop. To support mobile users, the Record Detail - Mobile component gives your mobile users a way to see the record details on their mobile devices on a Dynamic Forms-enabled page.")