Cert++
Close

Component visibility rules on Lightning pages

Key Takeaway

To show or hide a component on a Lightning page without code, add a visibility rule in the Lightning App Builder.

Component visibility rules let an app builder show or hide a component on a Lightning page based on filter conditions. For example, a rich text component on an opportunity page can appear only when the opportunity's Amount is greater than or equal to US$1 million. Visibility rules make one page adapt to the record's data, the viewing user, or the device.

How a visibility rule works

A visibility rule is one or more filters plus filter logic. You add it in a component's properties in the Lightning App Builder, without code.

A component with no filter displays as usual. After you define filters and set the filter logic, the component stays hidden until the logic's criteria are met.

When a component has several filters, the filter logic decides how they combine.

For example, imagine a component with two filters: Amount greater than or equal to 1000000, and Stage equal to Closed Won. If the filter logic requires both filters, the component shows only when both are true. If you choose "Any filters are true" under "Show component when", the component shows if either filter is true.

A component can have up to 10 filters. Each filter takes a single value, not comma-separated values, so matching several values means adding more filters.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Describe the user interface customization options.

0/20

Custom tab types

Learn this concept

Tab visibility in apps

Learn this concept

Lightning App Builder page types

Learn this concept

Path on Lightning record pages

Learn this concept

List view customization

Learn this concept

Kanban views for list views

Learn this concept

Lightning themes and branding

Learn this concept

Org-wide User Interface settings

Learn this concept

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.