Hamburger Menu Component
A responsive hamburger menu designed for social media interfaces with a dark mode theme and complementary color scheme.
HTML Code
<div class="lg:hidden">
<div class="flex items-center justify-between p-5 bg-gray-900 text-white">
<div class="text-2xl font-bold">SocialApp</div>
<button id="menu-toggle" class="focus:outline-none">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 6h16M4 12h16m-7 6h7" />
</svg>
</button>
</div>
<div id="menu" class="absolute top-0 left-0 w-full h-full bg-gray-800 opacity-0 pointer-events-none transition-opacity duration-300 ease-in-out">
<div class="flex flex-col items-center justify-center h-full space-y-5 text-xl text-white">
<img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-24 h-24 rounded-full border-2 border-indigo-500">
<a href="#" class="hover:text-indigo-300 transition duration-300">Home</a>
<a href="#" class="hover:text-indigo-300 transition duration-300">Profile</a>
<a href="#" class="hover:text-indigo-300 transition duration-300">Messages</a>
<a href="#" class="hover:text-indigo-300 transition duration-300">Settings</a>
</div>
</div>
</div>
<style>
#menu-toggle:focus + #menu {
opacity: 1;
pointer-events: auto;
}
</style>
Related Components
3D Hamburger Menu Component
A responsive Hamburger Menu with a 3D design incorporating triadic color scheme and complex interactive elements for business/corporate websites.
Hamburger Menu Component
A complex, responsive, and vibrant hamburger menu component with microinteractions for e-commerce, featuring a slide-out navigation, category links, a search bar, and social media icons. It supports dark mode and uses Lorem Picsum for images.