How to show or hide Salesforce Lightning Components

Since its inception, Salesforce Lightning components have provided a new look & feel and better way to use Salesforce. It is certainly a long journey covered starting from many restrictions in changing anything without code to easy customizations & component options. Today things are different when we see the components we have options of many standard components like Report Chart, List view, Path and many more and also options for custom components and the ones available on AppExchange.

Today, we are focusing on a feature that makes usage of the Salesforce Lightning Components more useful and that is an option to “HIDE & SHOW Lightning Component”. The option of set component visibility is used to add the filter logic for a component or multiple filters at a time as well. This is available for standard and custom components and an easy to use functionality makes it very useful for many scenarios and can help in different ways. If there is a question in your mind that how can I use hide & show lightning components or is this for me then lets see some scenarios below that may help you decide.

Scenarios of Hide & show Lightning components

With the feature of visibility control in Salesforce Lightning components, an admin have the power to set the screens based on the users and there can be many possibilities to make cleaner page layouts.

Viewing Capabilities of Same Profile
Earlier every user in a profile had the same view of the page, now we can show to each user in the same profile, what is important for them.

Components based on the filters
Admin can set different types of components that can be displayed on the screen as per the need, for example in a case record if there is no update in the case within a fixed SLA then a rick text standard component can be used to create a prompt alert for users.
Similarly when a user completes a transaction or did not complete or wins an opportunity then a flow component can be created.
Another example will be if Opportunity is closed lost only then the Approval related list should be shown or for Cases similar approach can be used.

There are many use cases that can be considered to hide & show Salesforce Lightning components and that can enhance the user interaction for a better experience.