function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tapasvini MakvanaTapasvini Makvana 

Submenu creation in lightning Components

Hi,

I want to create a submenu using the lightning component.using existing ui:menu component we can create menu but i need to create submenu of menuitem. Can anyone help me how can i achieve it??
Thanks in advance..
Ramakrishna Reddy GouniRamakrishna Reddy Gouni
do you want sub menu navigation, it not work in salesforce org. it is possible in communities interface. salesforce provided all kind of interfaces here. by using interfaces you can develop your own templates and layouts as your requirment. 
Deepali KulshresthaDeepali Kulshrestha
Hi Tapasvini,

As per your requirement, you can use the below code to create submenu in the lightning component:

<ui:menu>
    <ui:menuTriggerLink label="My Favourite Pie"/>
    <ui:menuList>
        <ui:actionMenuItem aura:id="item1" label="Chicken and Mushroom"/>
        <ui:actionMenuItem aura:id="item2" label="Steak and Ale"/>
        <ui:actionMenuItem aura:id="item3" label="Cheese and Onion"/>
    </ui:menuList>
</ui:menu>

For more detail refer to these links:
https://www.lightningdesignsystem.com/components/menus/
https://salesforce.stackexchange.com/questions/228529/submenu-inside-lightningbuttonmenu-component?rq=1
https://salesforce.stackexchange.com/questions/142549/how-to-close-slds-dropdown-menu-when-clicked-outside-in-lightning-component

I hope this solution will help you. Please mark it as best answers if it helps.
Thanks.
Deepali Kulshrestha