1

I am trying to figure out how to add a Lightning Web Component to a Lightning tab. I have it on the Home Page, but I would like it to be on its own tab. I feel like there should be an option to expose it to the Lightning tabs. When I am in the Tabs section, I don't see my LWC listed.

  • 1
    You can if you have a Lighting Page Tab created. – Jayant Das Mar 14 at 15:27
  • @JayantDas how about lightning component tab? – Pranay Jaiswal Mar 14 at 15:39
  • 1
    @PranayJaiswal as long as your LWC is wrapped within an Aura component, then Yes. Because you cannot really edit a Lighting (Aura) Component tab but only associate it with an aura component. – Jayant Das Mar 14 at 15:42
1

I was able to do this by:

  • Setup
  • Lightning App Builder
  • List item
  • Create a new App Page
  • Add the LWC to the page
  • Associate the page with an App
  • Funny, this isn't the correct answer to your own question. – compski Oct 10 at 9:19
  • @compski I don't understand your comment. The solution I listed was a way to accomplish what I needed. I put the LWC on a page, added the page to an app, and then assigned the app to a tab. – Michele Kleinhomer Oct 11 at 10:59
  • Why do you need to put LWC on a page to then assign it to a tab? Your question after all was "When I am in the Tabs section, I don't see my LWC listed." This article shows you how to have it on Tab section and have ur LWC listed salesforcecodecrack.com/2019/08/… – compski Oct 13 at 6:07
1

So far (Spring '19), using a Lightning web component inside a tab isn't supported, as listed here.

What you can do is wrap it inside an aura component, and create a tab for it.

0

With Winter 20 release, we can create the Lightning Tab using LWC component. You will just have to add the below tag in the -meta.xml file of LWC component.

<target>lightning__Tab</target>
  • Although this will be good IF Salesforce does release this and their safe harbour statements mean you cannot rely on this info. – Timothy Aug 16 at 8:42
  • It's available in Summer'20 Pre-Release Org. You can cross-verify there. – Hemant Keni Aug 17 at 10:36
  • 1
    Your answer is only partially correct. The full solution is on this link : salesforcecodecrack.com/2019/08/… – compski Oct 10 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.