Sticky Navigation Component
A minimalist and responsive sticky navigation bar for blogs, featuring a vibrant color scheme. It supports dark mode and has a simple, clean layout with "Blog Title" on the left and navigation links on the right. The navigation bar sticks to the top of the viewport when the user scrolls.
HTML Code
<nav class="bg-gradient-to-r from-teal-400 to-blue-500 dark:from-gray-800 dark:to-gray-900 p-4 shadow-md sticky top-0 z-50">
<div class="container mx-auto flex justify-between items-center">
<!-- Blog Title -->
<a href="#" class="text-white text-2xl font-bold dark:text-gray-100">Blog Title</a>
<!-- Navigation Links -->
<div class="hidden md:flex space-x-6">
<a href="#" class="text-white hover:text-gray-100 dark:text-gray-300 dark:hover:text-white transition duration-300 ease-in-out">Home</a>
<a href="#" class="text-white hover:text-gray-100 dark:text-gray-300 dark:hover:text-white transition duration-300 ease-in-out">Categories</a>
<a href="#" class="text-white hover:text-gray-100 dark:text-gray-300 dark:hover:text-white transition duration-300 ease-in-out">About</a>
<a href="#" class="text-white hover:text-gray-100 dark:text-gray-300 dark:hover:text-white transition duration-300 ease-in-out">Contact</a>
</div>
<!-- Mobile Menu Button (Hamburger) -->
<div class="md:hidden">
<button class="text-white 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 12h16M4 18h16"></path>
</svg>
</button>
</div>
</div>
<!-- Mobile Menu (Hidden by default, can be shown with JS) -->
<div class="md:hidden mt-4 space-y-2">
<!-- Hidden for this pure HTML example as JS is not allowed -->
</div>
</nav>
Related Components
Sticky Navigation Component - Dark Mode Pastel
A sticky navigation bar designed for dark mode, featuring a responsive layout and pastel color accents. The navigation bar remains at the top of the viewport as the user scrolls, improving usability for content-heavy pages. It includes placeholders for a logo or site title and navigation links, styled with Tailwind CSS for a modern, clean look.
Grayscale Skeuomorphic Sticky Nav
A responsive sticky navigation bar for blogs, styled with skeuomorphism using a grayscale palette. Features dark mode support and a simple layout. Built with Tailwind CSS (HTML only), no JavaScript. The skeuomorphic design aims to make the navigation bar appear like a physical, slightly raised element.
Sticky Navigation Component
A sticky navigation component for e-commerce, featuring a minimalist/flat design with vibrant colors. It includes a logo, search bar, cart icon, and user avatar, all styled with Tailwind CSS for responsiveness and dark theme support.