It is commonly placed within drawers or sidebars.
For hierarchical menu structures, use vertical_nav_nested/1 within the
:item slot.
To include sections in your drawer or sidebar that are not part of the
navigation menu (like informational text or a site search), use the
vertical_nav_section/1 component.
If the list is part of a navigation landmark you render yourself, set
landmark={false}. The component then renders a <div> instead of a
<nav>, and the label names the list.
Maturity: Developing
Usage
<.vertical_nav id="main-nav" label="Main">
<:item>
<.link navigate={~p"/dashboard"}>Dashboard</.link>
</:item>
<:item>
<.vertical_nav_nested id="content-nav">
<:title>Content</:title>
<:item current_page>
<.link navigate={~p"/posts"}>Posts</.link>
</:item>
<:item>
<.link navigate={~p"/comments"}>Comments</.link>
</:item>
</.vertical_nav_nested>
</:item>
</.vertical_nav>
Inside a navigation landmark:
<nav aria-label="Main">
<.vertical_nav id="project-nav" landmark={false}>
<:title>Projects</:title>
<:item>
<.link navigate={~p"/projects/1"}>Adoption</.link>
</:item>
</.vertical_nav>
</nav>