组件 页眉 头部组件

头部组件

具有微交互、互补配色方案、复杂复杂性的标题组件,用于仪表板用途,使用 Tailwind CSS。

预览

HTML 代码

<header class="bg-gray-100 dark:bg-gray-800 shadow-md">
  <div class="container mx-auto px-4 py-4 flex items-center justify-between">
    <div class="flex items-center space-x-4">
      <h1 class="text-xl font-bold text-gray-800 dark:text-white">Dashboard</h1>
      <nav class="hidden md:flex space-x-4">
        <a href="#" class="text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400 transition duration-300 ease-in-out transform hover:scale-105">Overview</a>
        <a href="#" class="text-gray-600 dark:text-gray-300 hover:text-green-500 dark:hover:text-green-400 transition duration-300 ease-in-out transform hover:scale-105">Analytics</a>
        <a href="#" class="text-gray-600 dark:text-gray-300 hover:text-yellow-500 dark:hover:text-yellow-400 transition duration-300 ease-in-out transform hover:scale-105">Reports</a>
      </nav>
    </div>

    <div class="flex items-center space-x-4">
      <button class="text-gray-600 dark:text-gray-300 hover:text-red-500 dark:hover:text-red-400 transition duration-300 ease-in-out transform hover:rotate-6 focus:outline-none">
        <svg class="h-6 w-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="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0a3 3 0 11-6 0m6 0v2a3 3 0 11-6 0v-2"></path></svg>
      </button>

      <div class="relative">
        <button class="flex items-center space-x-2 text-gray-600 dark:text-gray-300 hover:text-purple-500 dark:hover:text-purple-400 transition duration-300 ease-in-out transform hover:scale-105 focus:outline-none">
          <img class="h-8 w-8 rounded-full" src="https://randomuser.me/api/portraits/men/32.jpg" alt="User Avatar">
          <span class="hidden md:block font-medium">John Doe</span>
        </button>
        <!-- Dropdown would be implemented with JS, not included here -->
      </div>
    </div>
  </div>
</header>

相关组件

电子商务标题组件

使用 Tailwind CSS 和 Material Design 原则构建的响应式电子商务标头组件。具有单色配色方案(蓝色阴影)、搜索功能、导航菜单、购物车和用户配置文件。该标题包括阴影等深度效果,并支持深色模式。该组件通过移动汉堡菜单完全响应。

打开

复古头部组件

复古/老式头部组件,具有响应效果和深色主题支持。

打开

3D标题组件

一个复杂的、互动的头部组件,专为社交媒体界面设计,采用 3D 风格和灰度色彩。包括一个标志、搜索框、用户头像和操作按钮,具有响应式行为和暗模式支持。

打开