미디어 컴포넌트 컴포넌트
마이크로 인터랙션, 그레이스케일 색 구성표, 적당한 복잡성, 반응형 디자인 및 어두운 테마 지원을 갖춘 전자 상거래를 위한 미디어 구성 요소입니다.
HTML 코드
<div class="max-w-xs mx-auto overflow-hidden bg-white rounded-lg shadow-lg dark:bg-gray-800">
<div class="relative">
<img class="object-cover w-full h-48 transition-transform duration-300 transform group-hover:scale-105" src="https://picsum.photos/400/300?random=1"
alt="Product Image">
<div
class="absolute top-0 left-0 flex items-center justify-center w-full h-full text-white transition-opacity duration-300 bg-black bg-opacity-50 opacity-0 group-hover:opacity-100">
<svg class="w-12 h-12" 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 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z">
</path>
</svg>
</div>
</div>
<div class="px-4 py-3">
<h3 class="text-lg font-medium text-gray-800 dark:text-white">Product Name</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-300">Short product description goes here.</p>
<div class="flex items-center justify-between mt-3">
<span class="text-xl font-bold text-gray-800 dark:text-white">$29.99</span>
<button
class="px-3 py-2 text-xs font-medium text-white uppercase transition-colors duration-300 transform bg-gray-800 rounded hover:bg-gray-700 dark:hover:bg-gray-600 focus:outline-none focus:bg-gray-700 dark:focus:bg-gray-600">
Add to Cart
</button>
</div>
</div>
</div>
관련 구성 요소
Bauhaus_E-commerce_Media_Component
Bauhaus에서 영감을 받은 단색 디자인, 다크 모드 지원, 제품 프레젠테이션을 위한 기하학적 형태 및 명확한 시각적 계층 구조를 강조하는 반응형의 기능적인 전자 상거래 미디어 구성 요소입니다.
Glassmorphic 미디어 컴포넌트
Tailwind CSS로 제작된 glassmorphism 디자인(젖빛 유리 효과)이 있는 반응형 미디어 카드 구성 요소입니다. 호버로 표시되는 재생 아이콘이 있는 이미지 자리 표시자(picsum.photos), 텍스트 콘텐츠, 아바타가 있는 작성자 섹션(randomuser.me 에서) 및 작업 버튼이 있습니다. 이 구성 요소는 Tailwind CSS 'dark:' 변형을 사용하여 다크 모드를 지원하며 다양한 화면 크기에 반응합니다. JavaScript가 필요하지 않습니다. 최적의 시각 효과를 얻으려면 이 구성 요소를 대비되는 배경에 배치하십시오. 다크 모드 기능은 적절한 Tailwind CSS 구성(예: tailwind.config.js의 'darkMode: "class"')을 가정합니다.