Header Component
A simple, responsive header component for social media, with dark mode support. It features a logo, a search bar, and user avatar. Uses a grayscale color scheme.
HTML Code
<header class="bg-white dark:bg-gray-900 p-4 shadow-md">
<div class="container mx-auto flex justify-between items-center">
<!-- Logo or Site Title -->
<a href="#" class="text-2xl font-bold text-gray-900 dark:text-white">SocialSite</a>
<!-- Search Bar -->
<div class="flex-grow mx-4 max-w-xl">
<input type="text" placeholder="Search..." class="w-full p-2 rounded-lg bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 dark:focus:ring-gray-600">
</div>
<!-- User Avatar/Menu -->
<div class="flex items-center space-x-4">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar" class="w-10 h-10 rounded-full border-2 border-gray-300 dark:border-gray-600">
</div>
</div>
</header>
Related Components
Header Component
A responsive header component for a dashboard with microinteractions and vibrant colors, supporting dark theme.
Brutalist Header Component
A raw and bold header component designed with Tailwind CSS, featuring high contrast and unusual layouts suitable for both light and dark themes.
Header Component
A Neumorphism styled header component for a portfolio with a dark theme, responsive design, and contains multiple interactive elements.