Componentes Menú desplegable Componente de menú desplegable

Componente de menú desplegable

Un componente de menú desplegable diseñado con el estilo Glassmorphism, con efectos responsivos y soporte para temas oscuros usando Tailwind CSS.

Vista previa

Código HTML

<div class="relative inline-block text-left">
  <div>
    <button type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white dark:bg-gray-800 text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500" aria-expanded="true" aria-haspopup="true">
      Options
      <svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
        <path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06 0L10 10.293l3.71-3.07a.75.75 0 011.07 1.04l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 010-1.06z" clip-rule="evenodd" />
      </svg>
    </button>
  </div>

  <div class="z-10 hidden origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
    <div class="py-1" role="none">
      <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700" role="menuitem">
        <img src="https://picsum.photos/30/30" alt="Avatar" class="rounded-full mr-2">
        Account Settings
      </a>
      <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700" role="menuitem">
        <img src="https://picsum.photos/30/30" alt="Avatar" class="rounded-full mr-2">
        Support
      </a>
      <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700" role="menuitem">
        <img src="https://picsum.photos/30/30" alt="Avatar" class="rounded-full mr-2">
        License
      </a>
      <div class="border-t border-gray-200 dark:border-gray-700"></div>
      <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700" role="menuitem">
        <img src="https://picsum.photos/30/30" alt="Avatar" class="rounded-full mr-2">
        Logout
      </a>
    </div>
  </div>
</div>

<style>
  .bg-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 8px;
  }
  .dark .bg-glass {
    background: rgba(31, 41, 55, 0.4);
  }
</style>

Componentes relacionados

Menú desplegable Neumorphic

Menú desplegable neumórfico para redes sociales con colores vibrantes y compatibilidad con modo oscuro.

Abrir

Componente de menú desplegable

Un componente de menú desplegable responsivo diseñado con microinteracciones y soporte de temas oscuros mediante Tailwind CSS.

Abrir

Componente de menú desplegable

Un componente de menú desplegable simple, orgánico/inspirado en la naturaleza con una paleta de colores retro/vintage, adecuado para empresas manufactureras/industriales. Cuenta con un diseño responsivo y compatibilidad con el modo oscuro.

Abrir