Tooltip 구성 요소
전자상거래를 위한 단색 색 구성표가 있는 반응형 Material Design 툴팁 구성 요소로, 다크 모드를 지원합니다. JavaScript, HTML 및 Tailwind CSS 만 없습니다.
HTML 코드
<div class="relative flex items-center justify-center bg-gray-100 dark:bg-gray-900 min-h-screen p-8">
<!-- Product Card (Example to show tooltip in context) -->
<div class="group relative w-full max-w-sm bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden transition-all duration-300 hover:shadow-xl">
<img class="w-full h-48 object-cover" src="https://picsum.photos/400/300?random=1" alt="Product Image">
<div class="p-6">
<h3 class="text-xl font-semibold text-gray-800 dark:text-gray-100 mb-2">Stylish Headphones</h3>
<p class="text-gray-600 dark:text-gray-300 text-sm mb-4">Immerse yourself in rich, clear sound with these premium headphones.</p>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold text-gray-900 dark:text-gray-50">$149.99</span>
<!-- Tooltip Trigger (e.g., Add to Cart Button) -->
<button class="relative bg-blue-600 hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-800 text-white font-medium py-2 px-4 rounded-full transition-colors duration-300 group focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">
Add to Cart
<!-- Tooltip Content -->
<div class="absolute bottom-full left-1/2 -translate-x-1/2 mb-2 w-max px-3 py-1.5 bg-gray-800 dark:bg-gray-100 text-white dark:text-gray-900 text-sm rounded-md opacity-0 group-hover:opacity-100 group-focus:opacity-100 transition-opacity duration-300 pointer-events-none shadow-lg">
Add item to your shopping cart
<svg class="absolute top-full left-1/2 -translate-x-1/2 w-3 h-3 text-gray-800 dark:text-gray-100 transform rotate-180" fill="currentColor" viewBox="0 0 20 20">
<path d="M10 0L0 10h20L10 0z"/>
</svg>
</div>
</button>
</div>
</div>
</div>
<!-- Another Tooltip Example (e.g., Info Icon) -->
<div class="group relative ml-12">
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-gray-500 dark:text-gray-400 cursor-pointer transition-colors duration-300 hover:text-blue-600 dark:hover:text-blue-500" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2h1a1 1 0 001-1V9a1 1 0 00-1-1H9zm6 3a1 1 0 100 2h2a1 1 0 100-2h-2z" clip-rule="evenodd" />
</svg>
<!-- Tooltip Content -->
<div class="absolute bottom-full left-1/2 -translate-x-1/2 mb-2 w-max px-3 py-1.5 bg-gray-800 dark:bg-gray-100 text-white dark:text-gray-900 text-sm rounded-md opacity-0 group-hover:opacity-100 group-focus:opacity-100 transition-opacity duration-300 pointer-events-none shadow-lg">
More information about the product
<svg class="absolute top-full left-1/2 -translate-x-1/2 w-3 h-3 text-gray-800 dark:text-gray-100 transform rotate-180" fill="currentColor" viewBox="0 0 20 20">
<path d="M10 0L0 10h20L10 0z"/>
</svg>
</div>
</div>
</div>
관련 구성 요소
Brutalism Tooltip 구성 요소
소셜 미디어를 위한 Brutalism 스타일의 툴팁 구성 요소로, 회색조 색 구성표와 복잡한 대화형 요소를 특징으로 합니다. 반응형이며 JavaScript 없이 Tailwind CSS를 사용하여 다크 모드를 지원합니다.
3D_Real_Estate_Tooltip
3D 디자인 요소와 따뜻한 일몰 색 구성표가 있는 적당히 복잡하고 반응이 빠른 툴팁 구성 요소로, 부동산 부동산 목록에 적합합니다. 다크 모드 지원이 포함됩니다.
미니멀리스트 파스텔 툴팁
비즈니스 및 기업 웹 사이트용으로 설계된 미니멀하고 평평한 툴팁 구성 요소로, 파스텔 색상, 반응형 디자인 및 Tailwind CSS를 사용하는 다크 모드를 지원합니다.