Components / Navigation
Navigation Menu
Displays site navigation with popover panels.
Status stableInstalls popover-primitive
<div style="display: flex; width: 100%; align-items: flex-start; justify-content: flex-start; min-height: 20rem; padding-top: 1rem">
<nav class="navigation-menu" aria-label="Main">
<ul>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-starting">
Getting started
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-starting" style="width: 22rem">
<ul>
<li>
<a href="#">
<span data-slot="title">Introduction</span>
<span data-slot="description">Re-usable native CSS components for any project.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Installation</span>
<span data-slot="description">How to install dependencies and structure your app.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Typography</span>
<span data-slot="description">Styles for headings, paragraphs and lists.</span>
</a>
</li>
</ul>
</div>
</li>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-components">
Components
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-components" style="width: 30rem">
<ul style="grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem">
<li>
<a href="#">
<span data-slot="title">Alert Dialog</span>
<span data-slot="description">A modal dialog that interrupts the user with important content.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Hover Card</span>
<span data-slot="description">Preview content available behind a link.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Progress</span>
<span data-slot="description">Shows the completion progress of a task.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Tabs</span>
<span data-slot="description">Layered sections displayed one at a time.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Tooltip</span>
<span data-slot="description">A label shown on hover or keyboard focus.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">Scroll Area</span>
<span data-slot="description">A styled native scroll container.</span>
</a>
</li>
</ul>
</div>
</li>
<li><a href="#">Docs</a></li>
</ul>
</nav>
</div>Installation
pnpm dlx loseta add navigation-menunpx loseta add navigation-menuExamples
With icons
<div style="display: flex; justify-content: center; min-height: 16rem; padding-top: 1rem">
<nav class="navigation-menu" aria-label="Task views">
<ul>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-status">
Status
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-status" style="width: 14rem">
<ul>
<li>
<a href="#">
<span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/></svg></span>
<span data-slot="title">Backlog</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10.1 2.18a9.93 9.93 0 0 1 3.8 0"/><path d="M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7"/><path d="M21.82 10.1a9.93 9.93 0 0 1 0 3.8"/><path d="M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69"/><path d="M13.9 21.82a9.94 9.94 0 0 1-3.8 0"/><path d="M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7"/><path d="M2.18 13.9a9.93 9.93 0 0 1 0-3.8"/><path d="M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69"/></svg></span>
<span data-slot="title">To do</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.801 10A10 10 0 1 1 17 3.335"/><path d="m9 11 3 3L22 4"/></svg></span>
<span data-slot="title">Done</span>
</a>
</li>
</ul>
</div>
</li>
<li><a href="#">Docs</a></li>
</ul>
</nav>
</div>Links
<div style="display: flex; justify-content: center; min-height: 16rem; padding-top: 1rem">
<nav class="navigation-menu" aria-label="Resources">
<ul>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-resources">
Resources
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-resources" style="width: 12rem">
<ul>
<li><a href="#"><span data-slot="title">Documentation</span></a></li>
<li><a href="#"><span data-slot="title">GitHub</span></a></li>
<li><a href="#"><span data-slot="title">Support</span></a></li>
<li><a href="#"><span data-slot="title">Changelog</span></a></li>
</ul>
</div>
</li>
<li><a href="#">Docs</a></li>
</ul>
</nav>
</div>Right-to-left
<div style="display: flex; justify-content: center; min-height: 20rem; padding-top: 1rem">
<nav class="navigation-menu" aria-label="القائمة الرئيسية" dir="rtl" lang="ar">
<ul>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-rtl-start">
البدء
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-rtl-start" style="width: 22rem">
<ul>
<li>
<a href="#">
<span data-slot="title">مقدمة</span>
<span data-slot="description">مكونات أصلية قابلة لإعادة الاستخدام لأي مشروع.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">التثبيت</span>
<span data-slot="description">كيفية تثبيت التبعيات وتنظيم تطبيقك.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">الطباعة</span>
<span data-slot="description">أنماط للعناوين والفقرات والقوائم.</span>
</a>
</li>
</ul>
</div>
</li>
<li>
<button type="button" aria-expanded="false" aria-controls="demo-nav-rtl-components">
المكونات
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg>
</button>
<div data-popover data-side="bottom" aria-hidden="true" id="demo-nav-rtl-components" style="width: 22rem">
<ul>
<li>
<a href="#">
<span data-slot="title">حوار التنبيه</span>
<span data-slot="description">حوار نافذة يقطع المستخدم بمحتوى مهم.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">التقدم</span>
<span data-slot="description">يعرض مؤشرًا يوضح تقدم إتمام المهمة.</span>
</a>
</li>
<li>
<a href="#">
<span data-slot="title">التبويبات</span>
<span data-slot="description">مجموعة من أقسام المحتوى المعروضة واحدة في كل مرة.</span>
</a>
</li>
</ul>
</div>
</li>
<li><a href="#">الوثائق</a></li>
</ul>
</nav>
</div>Accessibility and behavior
- nav > ul > li. Triggers use aria-expanded and aria-controls; panels are [data-popover] with links. Link parts use [data-slot="icon"], [data-slot="title"] and [data-slot="description"]. The trigger chevron rotates while expanded. Open/close and keyboard navigation are consumer JavaScript; there is no built-in mobile layout.
Files
components/navigation-menu.cssbasestyles/nova/navigation-menu.cssstyleInstall contract
The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.