Navigations-Komponenten
Eine Navigationsleiste im Dunkelmodus mit responsivem Design mit Logo, Avatar und Links für die Navigation.
HTML-Code
<nav class="bg-gray-900 text-white p-4 flex justify-between items-center">
<div class="flex items-center space-x-4">
<img src="https://picsum.photos/50/50" alt="Logo" class="w-10 h-10 rounded-full">
<span class="text-xl font-semibold">My Website</span>
</div>
<div class="hidden md:flex space-x-4">
<a href="#" class="hover:text-gray-400 transition duration-200">Home</a>
<a href="#" class="hover:text-gray-400 transition duration-200">About</a>
<a href="#" class="hover:text-gray-400 transition duration-200">Services</a>
<a href="#" class="hover:text-gray-400 transition duration-200">Contact</a>
</div>
<div class="relative">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full cursor-pointer">
<div class="absolute right-0 mt-2 w-48 bg-gray-800 text-white rounded-md shadow-lg hidden group-hover:block">
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Profile</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Settings</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Logout</a>
</div>
</div>
</nav>
<style>
@media (prefers-color-scheme: dark) {
body {
background-color: #1a1a1a;
}
}
</style>
Verwandte Komponenten
Retro-E-Commerce-Navigationsleiste
Eine Graustufen-Navigationskomponente im Retro-/Vintage-Stil für den E-Commerce mit moderater Komplexität und interaktiven Elementen wie Hovers und Dropdowns. Es ist reaktionsschnell und bietet Unterstützung für den Dunkelmodus mit Tailwind CSS.
RetroPortfolioNavigation
Retro/Vintage-Navigationskomponente für Portfolio mit Pastell-Farbschema, reaktionsschneller und Unterstützung für den Dunkelmodus.
Navigationskomponente
Eine komplexe Navigationskomponente im 3D-Design für Blogs mit einem triadischen Farbschema und reaktionsschneller Unterstützung für dunkle Themen.