Navigationsleiste
Komponente der responsiven Navigationsleiste im Dunkelmodus mit Tailwind CSS
HTML-Code
<nav class="bg-gray-800 text-white p-4">
<div class="container mx-auto flex justify-between items-center">
<div class="text-lg font-bold">Brand</div>
<div class="hidden md:flex space-x-4">
<a href="#" class="hover:text-gray-400">Home</a>
<a href="#" class="hover:text-gray-400">About</a>
<a href="#" class="hover:text-gray-400">Services</a>
<a href="#" class="hover:text-gray-400">Contact</a>
</div>
<div class="md:hidden">
<button class="text-white focus:outline-none" id="menu-btn">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7"/>
</svg>
</button>
</div>
</div>
<div class="md:hidden" id="menu" style="display: none;">
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Home</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">About</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Services</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Contact</a>
</div>
</nav>
<!-- User Avatar Section -->
<div class="p-4 bg-gray-900">
<div class="container mx-auto flex items-center">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full">
<span class="ml-2">User Name</span>
</div>
</div>
<!-- Placeholder Image Section -->
<div class="p-4">
<img src="https://picsum.photos/1920/1080" alt="Placeholder Image" class="w-full h-auto">
</div>
Verwandte Komponenten
Komponente der Navigationsleiste
Eine reaktionsschnelle Navigationsleiste für ein Dashboard mit einem Dark-Mode-Design mit Erdtönen. Enthält ein Logo, Navigationslinks, eine Suchleiste und einen Abschnitt mit Benutzerprofil. Konzipiert für moderate Komplexität mit interaktiven Elementen.
Blog-Navigationsleiste
Responsive Navigationsleiste mit Unterstützung des Dunkelmodus für Blog-/Content-Websites. Verfügt über ein minimalistisches/flaches Design mit einem pastellfarbenen Farbschema.
Navigationsleiste für soziale Medien
Glassmorphism Graustufen Einfache Komponente der Navigationsleiste für soziale Medien