Social Media Header Component
A complex, dark-mode responsive Header Component with a minimalist design and a complementary color scheme, designed for social media interfaces.
HTML Code
<header class="bg-white dark:bg-gray-900 text-gray-800 dark:text-white shadow-md">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-4">
<h1 class="text-2xl font-bold">SocialNet</h1>
<nav class="hidden md:flex space-x-4">
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Feed</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Profile</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Messages</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Notifications</a>
</nav>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search..." class="px-4 py-2 rounded-full border border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 absolute right-3 top-3 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</div>
<button class="md:hidden">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
<div class="relative">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar" class="w-10 h-10 rounded-full cursor-pointer">
<span class="absolute bottom-0 right-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white dark:border-gray-900"></span>
</div>
</div>
</div>
<div class="container mx-auto px-4 py-2 md:hidden bg-gray-200 dark:bg-gray-800">
<nav class="flex justify-around text-sm">
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Feed</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Profile</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Messages</a>
<a href="#" class="hover:text-blue-500 dark:hover:text-blue-400">Notifications</a>
</nav>
</div>
</header>
Related Components
Retro Vintage Header Component
A responsive header component with a retro/vintage design style, featuring support for dark mode and nostalgic aesthetics inspired by the 80s and 90s.
Material Design Business Header
Material Design inspired simple header component with complementary color scheme for business websites. Responsive design with dark theme support.