lwc Vertical Navigation display selected content -- w3web.net

Build a vertical navigation to show/hide a div container that display respective selected contents when clicking on the list of links Uses of “lightning-vertical-navigation” elements in Salesforce Lightning Web Component — LWC | how to create vertical navigation bar to display selected menus using elements of “lightning-vertical-navigation” & “lightning-vertical-navigation-item” in Salesforce LWC

Hey guys, today in this post we are going to learn about How to build a vertical navigation to show/hide a div container that display respective selected contents when clicking on the list of links Uses of “lightning-vertical-navigation” elements in Salesforce Lightning Web Component — LWC.

A lightning-vertical-navigation component represents a list of links that’s only one level deep, with support for overflow sections that collapse and expand. The overflow section must be created using lightning-vertical-navigation-overflow and does not adjust automatically based on the view port. To know more about vertical navigation, Use this link.

This component inherits styling from vertical navigation in the Lightning Design System.

 

Files we used in this post example →

lwcVerticalNavigation.html LWc HTML File Template HTML file to create vertical navigation in Salesforce Lightning Web Component (LWC)
lwcVerticalNavigation.js LWC JavaScript File It’s hold a javascript on click function to display the selected navigation contents in lwc.
lwcVerticalNavigation.js-meta.xml XML Meta File It is used to where this lightning web component file you want to display as lightning__AppPage, lightning__RecordPage, lightning__HomePage.
lwcVerticalNavigation.css Style CSS It is used to fixed the alignment of navigation tab container.
lwcVerticalNavigationApp.app Lightning Application It is used for call the component and preview on browser.

Final Output →

lwc Vertical Navigation display selected content -- w3web.net

Other related post that would you like to learn in LWC

  • Find the below steps

Create Lightning Web Component HTML →

Step 1:- Create Lightning Web Component : lwcVerticalNavigation.html

SFDX:Lightning Web Component >> New >> lwcVerticalNavigation.html

lwcVerticalNavigation.html [Lightning Web Component HTML]

Create Lightning Web Component JavaScript →

Step 2:- Create Lightning Web Component : lwcVerticalNavigation.js

SFDX:Lightning Web Component >> New >> lwcVerticalNavigation.js

lwcVerticalNavigation.js [LWC JavaScript File]

Create Lightning Web Component Meta XML →

Step 3:- Create Lightning Web Component : lwcVerticalNavigation.js-meta.xml

SFDX:Lightning Web Component >> New >> lwcVerticalNavigation.js-meta.xml

lwcVerticalNavigation.js-meta.xml [LWC Meta Data XML]

Create Component Style CSS →

Step 4:- Create Lightning Web Component : lwcVerticalNavigation.css

SFDX:Lightning Web Component >> New >> lwcVerticalNavigation.css

lwcVerticalNavigation.css [Style CSS]

Create Lightning Application →

Step 5:- Create Lightning Application : lwcVerticalNavigationApp.app

From Developer Console >> File >> New >> Lightning Application

lwcVerticalNavigationApp.app [Component Application File]

Further post that would you like to learn in LWC

Flyout is a free, simple way to earn money.

If you think you and your family members also like to earn money in additional time, then go this link. In this site, you can earn money for the lifetime at low effort. To Earn Unlimited Everyday With This Trick, Sign Up Free.. Get Started for Free

Flyout is a free, simple way to earn money by placing sponsored content on your blog

Check Out:- Earn Unlimited Everyday With This Trick:- Click Here

 

 

FAQ (Frequently Asked Questions)

How do you navigate from one component to another in LWC?

To navigate from one Lightning Web Component to another Lightning Web Component, You need to add the target Lightning Web Component inside an Aura Component having lightning:isUrlAddressable is added as interface.

How do you navigate from LWC to LWC?

If you want to navigate the user from one LWC to another LWC, you can embed LWC in an Aura Component and navigate the user from LWC to an Aura Component.

How do you use lightning navigate?

In the client-side controller, set the pageReference attribute for the lightning component and set the state and attributes. Set the URL on your link using the generateUrl() method on the init handler. handleClick method on the button click will navigate to the Target component.

Related Topics | You May Also Like

Hi, This is Vijay behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | The Sitemap where you can find all published post on w3web.net

1 thought on “Build a vertical navigation to show/hide a div container that display respective selected contents when clicking on the list of links Uses of “lightning-vertical-navigation” elements in Salesforce Lightning Web Component — LWC | how to create vertical navigation bar to display selected menus using elements of “lightning-vertical-navigation” & “lightning-vertical-navigation-item” in Salesforce LWC”

Leave a Comment