Lightning Web Component has been taking over Aura Components in every aspect.
One of the capabilities that were lacking until a few days back was the capability to be plugged as a Quick Action.
With Spring '21 even that is also sorted out. Now we can use Lightning Web Component as a Quick Action.
Let's get started and look at where all can we source a LWC!
On a Record page
We can throw an LWC on to the record page and have customisation built on top of it.
This is how the meta.xml file is going to look like.
On a App page
Generally, we create custom App Pages for apps and we can also plug LWC on to them if we have the config that's shown below.
On a Home page
We can also have the LWC placed on the Home Page. This is the target we need to have in place to get the LWC on to homepage.
In a Flow Screen
Flows are becoming more and more powerful for every release and we can embed LWC in flow screens.
We can also expose the properties from LWC, fetch and assign the values assigned to them in the flow. This is how the configuration file is going to look like in that case.
In Community Pages
Lightning Web Components are compatible with Communities too.
In Utility Bar
This is the configuration that we should have to embed a component in Utility Bar.
In Custom Tabs
We can plug the component to a tab and this is one of the easiest ways to test if a component is working as expected. Here is the target to plug a component in the tab.
In Quick Actions
Starting Spring '21 we can embed LWC in quick actions too and as of now the documentation doesn’t specify how the target should look like, but if I were to take an educated guess it's going to be something like this.