Navigationskomponente
Eine reaktionsschnelle Navigationskomponente, die für die Benutzeroberfläche des Dunkelmodus entwickelt wurde, mit Links, Dropdown-Menüs und einem Logo, die alle mit Tailwind CSS gestaltet sind.
HTML-Code
<nav class="bg-gray-800 p-4 fixed w-full">
<div class="flex justify-between items-center">
<div class="text-white text-lg font-bold">
<a href="#" class="flex items-center">
<img src="https://picsum.photos/40" alt="Logo" class="mr-2 rounded-full">
MyApp
</a>
</div>
<div class="hidden md:flex space-x-4">
<a href="#" class="text-gray-300 hover:bg-gray-700 px-3 py-2 rounded">Home</a>
<a href="#" class="text-gray-300 hover:bg-gray-700 px-3 py-2 rounded">About</a>
<div class="relative">
<button class="text-gray-300 hover:bg-gray-700 px-3 py-2 rounded flex items-center">Services
<svg class="w-4 h-4 ml-1" 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="M5 15l7-7 7 7"/>
</svg>
</button>
<div class="absolute left-0 hidden bg-gray-800 text-white mt-1 rounded shadow-md w-40">
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Web Design</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">SEO</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-700">Marketing</a>
</div>
</div>
<a href="#" class="text-gray-300 hover:bg-gray-700 px-3 py-2 rounded">Contact</a>
</div>
<div class="md:hidden">
<button class="text-gray-300 hover:bg-gray-700 px-3 py-2 rounded focus:outline-none">
<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>
</nav>
<div class="mt-16 p-4">
<h1 class="text-3xl text-white">Welcome to MyApp</h1>
<p class="text-gray-300">This is an example of a dark mode navigation component using Tailwind CSS.</p>
</div>
<style>
.dropdown:hover .dropdown-content {
display: block;
}
</style>
Verwandte Komponenten
3D_Candy_Finance_Navigation
Eine einfache, reaktionsschnelle Navigationskomponente für Finanz-/Bankanwendungen mit einem bonbonfarbenen Farbschema und subtilen 3D-Designelementen mit Unterstützung für den Dunkelmodus.
Skeuomorphe Navigationskomponente
Eine Navigationskomponente, die in einem skeuomorphen Stil gestaltet ist, mit leuchtenden Farben und einem responsiven Layout, das für Blog-Inhalte geeignet ist. Es enthält interaktive Funktionen wie Hover-Effekte und ist für den Dunkelmodus optimiert.
Retro-Vintage-Navigationskomponente
Eine reaktionsschnelle Navigationskomponente mit Retro-/Vintage-Ästhetik, die von den Stilen der 80er/90er Jahre inspiriert ist, mit einem pastellfarbenen Farbschema. Geeignet für Social-Media-Schnittstellen, einschließlich Unterstützung des Dunkelmodus.