드롭다운 메뉴 컴포넌트
Glassmorphism 스타일로 디자인된 드롭다운 메뉴 구성 요소로, Tailwind CSS를 사용하여 반응형 효과와 어두운 테마를 지원합니다.
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>
관련 구성 요소
레트로/빈티지 드롭다운 메뉴
레트로/빈티지 미학으로 전자 상거래를 위해 설계된 복잡한 드롭다운 메뉴 구성 요소로, 단색 색상, 풍부한 인터페이스, 다크 모드 지원을 포함한 반응형 디자인을 특징으로 합니다.
레트로 블로그 드롭다운 메뉴
블로그 콘텐츠를 위한 반응형 레트로 빈티지 드롭다운 메뉴입니다. 간단한 트라이어딕 색 구성표와 Tailwind CSS를 사용한 다크 모드 지원이 특징입니다. 자바스크립트가 없습니다.