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.
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 → To find source code demo link, Click Here..
Other related post that would you like to learn in LWC
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]
Lightning Web Component Meta 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
Final Output → To find source code demo link, Click Here..
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
Originally published at https://www.w3web.net on November 7, 2021.