구성 요소 드롭다운 메뉴 드롭다운 메뉴 컴포넌트

드롭다운 메뉴 컴포넌트

Tailwind CSS로 구축된 마이크로 인터랙션 및 어두운 테마 지원이 있는 반응형 드롭다운 메뉴입니다.

미리 보기

HTML 코드

<div class="relative w-64">
    <!-- Dropdown Button -->
    <button class="bg-gray-800 text-white font-semibold py-2 px-4 rounded inline-flex items-center focus:outline-none focus:ring-2 focus:ring-white">
        <span>Dropdown</span>
        <svg class="ml-2 w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 10l5 5 5-5" />
        </svg>
    </button>

    <!-- Dropdown Menu -->
    <div class="absolute w-full bg-gray-700 rounded-md mt-1 shadow-lg z-10 hidden group-hover:block transition-all ease-in-out duration-200 transform origin-top scale-y-0 group-hover:scale-y-100">
        <div class="py-1">
            <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-600 hover:text-white transition-colors duration-150">
                <img class="w-8 h-8 rounded-full mr-2" src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" />
                Profile
            </a>
            <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-600 hover:text-white transition-colors duration-150">
                <img class="w-8 h-8 rounded-full mr-2" src="https://randomuser.me/api/portraits/women/1.jpg" alt="User Avatar" />
                Settings
            </a>
            <a href="#" class="flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-600 hover:text-white transition-colors duration-150">
                <img class="w-8 h-8 rounded-full mr-2" src="https://randomuser.me/api/portraits/men/2.jpg" alt="User Avatar" />
                Logout
            </a>
        </div>
    </div>
</div>

<style>
    /* Dark Mode Support */
    @media (prefers-color-scheme: dark) {
        .bg-gray-700 { background-color: #374151; }
        .text-gray-300 { color: #D1D5DB; }
        .hover\:bg-gray-600:hover { background-color: #4B5563; }
    }
</style>

관련 구성 요소

드롭다운 메뉴 컴포넌트

문서 또는 위키 사이트용으로 설계된 복잡하고 반응이 빠른 드롭다운 메뉴 구성 요소로, Ocean/Blue 색 구성표가 있는 깔끔하고 미니멀한 스위스/국제 타이포그래피 스타일을 특징으로 합니다. 다크 모드 지원 및 여러 대화형 요소가 포함되어 있습니다.

열다

드롭다운 메뉴 컴포넌트

Tailwind CSS를 사용하는 Glassmorphism 디자인의 반응형 드롭다운 메뉴로, 다크 모드를 지원하고 흐릿한 배경 효과를 제공합니다.

열다

드롭다운 메뉴 컴포넌트

glassmorphism으로 스타일이 지정된 반응형 드롭다운 메뉴 구성 요소로, 블로그 또는 콘텐츠 소비에 적합하며 어두운 테마를 지원합니다.

열다