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.