Component
Multi-level Navigation
Nested dropdown navigation with multiple levels. Perfect for complex documentation and admin interfaces.
- Component
- Tailwind
- HTML
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/navigation/multi-level-navigation/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Navigation/multi-level-navigation Tailwind/Components/Navigation/multi-level-navigation <nav class="space-y-1">
<a href="#" class="flex items-center gap-3 px-4 py-3 bg-indigo-50 text-indigo-700 rounded-xl font-medium">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/>
</svg>
Dashboard
</a>
<!-- Multi-level Item -->
<div class="relative group">
<button class="w-full flex items-center justify-between px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<div class="flex items-center gap-3">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"/>
</svg>
<span>Components</span>
</div>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
</button>
<!-- Level 2 -->
<div class="absolute left-full top-0 ml-2 w-56 bg-white rounded-xl shadow-xl border border-gray-100 p-2 hidden md:block opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10">
<div class="relative group/sub">
<button class="w-full flex items-center justify-between px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">
<span>Buttons</span>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
</button>
<!-- Level 3 -->
<div class="absolute left-full top-0 ml-2 w-48 bg-white rounded-xl shadow-xl border border-gray-100 p-2 hidden md:block opacity-0 invisible group-hover/sub:opacity-100 group-hover/sub:visible transition-all">
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Primary</a>
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Secondary</a>
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Ghost</a>
</div>
</div>
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Cards</a>
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Forms</a>
<a href="#" class="block px-4 py-2.5 text-gray-600 hover:bg-gray-50 rounded-lg">Modals</a>
</div>
</div>
<a href="#" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
Documentation
</a>
<a href="#" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"/>
</svg>
Blog
</a>
<a href="#" class="flex items-center gap-3 px-4 py-3 text-gray-600 hover:bg-gray-50 rounded-xl transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
Help Center
</a>
</nav> # Multi Level Navigation
Multi-level navigation menus.
## Usage
```bash
npx devsnips add Tailwind/Components/Navigation/multi-level-navigation
```
Copy from `code.html`.
## File Structure
`code.html` · `preview.html` · `metadata.json` · `README.md` 65 lines UTF-8 · LF · Spaces: 2
Continue browsing