장바구니에 제품을 추가하기 위한 버튼
Tailwind CSS를 사용하여 머티리얼 디자인 원칙에 따라 스타일링된 반응형 장바구니에 담기 버튼으로, 다크 모드 테마를 지원합니다.
<div class="flex items-center justify-center h-screen bg-gray-100 dark:bg-gray-800 transition-colors duration-300"> <div class="bg-white dark:bg-gray-900 shadow-lg rounded-lg px-5 py-4 transition-transform duration-300 hover:scale-105"> <img src="https://picsum.photos/200/200" alt="Product Image" class="w-full h-40 object-cover rounded-md mb-4"> <h2 class="text-lg font-semibold dark:text-white">Product Name</h2> <p class="text-gray-700 dark:text-gray-300 mb-4">This is a brief description of the product.</p> <div class="flex items-center justify-between"> <span class="text-xl font-bold dark:text-white">$19.99</span> <button class="bg-blue-600 text-white rounded-md px-4 py-2 transition-colors duration-300 hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 dark:bg-blue-700 dark:hover:bg-blue-600"> Add to Cart </button> </div> </div> </div>
반응형 효과와 어두운 테마를 지원하는 Skeuomorphic Add to Cart 버튼.
<button class="bg-gradient-to-b from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-800 text-gray-800 dark:text-gray-200 py-3 px-6 rounded-lg shadow-md hover:shadow-lg transition duration-300 ease-in-out" > <span class="flex items-center justify-center"> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" > <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" ></path> </svg> Add to Cart </span> </button>
Tailwind CSS를 사용하여 반응형 효과와 어두운 테마를 지원하는 3D 디자인 Add to Cart 버튼 구성 요소입니다.
<div class="flex items-center justify-center min-h-screen bg-gray-100 dark:bg-gray-900"> <div class="relative group"> <button class="relative px-6 py-2 font-bold text-white transition-transform duration-300 bg-blue-600 rounded-lg shadow-lg transform hover:scale-105 active:scale-95 dark:bg-blue-700"> <span class="absolute top-0 left-0 w-full h-full rounded-lg bg-blue-500 opacity-60 transition-opacity duration-300 group-hover:opacity-100"></span> <span class="relative z-10">Add to Cart</span> </button> <div class="absolute right-0 -top-1 -mr-4 z-0 w-10 h-10 bg-blue-200 rounded-full shadow-lg transform scale-75 transition-all duration-300 group-hover:scale-100"></div> </div> </div>
Tailwind CSS가 포함된 잔인함에서 영감을 받은 장바구니에 담기 버튼 구성 요소는 고대비, 특이한 레이아웃, 반응형 효과 및 어두운 테마 지원을 특징으로 합니다.
<div class="flex flex-col items-center justify-center space-y-4 p-4 bg-white dark:bg-gray-800 border-2 border-black dark:border-white rounded-lg shadow-md"> <img src="https://picsum.photos/200/100" alt="Product Image" class="w-full h-auto rounded-lg"> <div class="flex flex-col items-center text-center"> <h2 class="text-lg font-bold text-black dark:text-white">Product Name</h2> <p class="text-sm text-gray-700 dark:text-gray-300">This is a brief description of the product that gives the user an idea of what they're adding to their cart.</p> <button class="mt-4 px-6 py-3 bg-yellow-500 text-white font-bold text-sm uppercase rounded-md transition-all duration-300 transform hover:bg-yellow-600 hover:scale-105 focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:ring-opacity-50 dark:bg-yellow-400 dark:text-black dark:hover:bg-yellow-500"> Add to Cart </button> </div> </div>
Tailwind CSS를 사용하여 다크 모드용으로 설계된 반응형 장바구니에 추가 버튼입니다.
<div class="flex items-center justify-center p-10 bg-gray-900 min-h-screen"> <div class="bg-gray-800 rounded-lg shadow-lg p-6"> <div class="flex items-center"> <img src="https://picsum.photos/100" alt="Product Image" class="w-16 h-16 rounded-lg mr-4"> <div class="text-white"> <h2 class="text-lg font-semibold">Product Name</h2> <p class="text-gray-400">Product description goes here.</p> <p class="text-xl font-bold mt-2">$29.99</p> </div> </div> <button class="mt-4 w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded transition duration-200 ease-in-out"> Add to Cart </button> </div> </div>
Tailwind CSS로 디자인된 스큐어모픽 '장바구니에 담기' 버튼 컴포넌트로, 반응형 효과와 어두운 테마 지원을 특징으로 합니다.
<div class="flex items-center justify-center h-screen bg-gray-100 dark:bg-gray-900"> <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 flex items-center space-x-4 transition-transform transform hover:scale-105"> <img src="https://picsum.photos/50" alt="Product Image" class="w-12 h-12 rounded-lg shadow"> <div class="flex-1"> <h2 class="text-lg font-bold text-gray-800 dark:text-gray-200">Product Name</h2> <p class="text-gray-600 dark:text-gray-400">Short description of the product.</p> </div> <button class="bg-blue-500 text-white font-semibold py-2 px-4 rounded-lg shadow-md hover:bg-blue-400 transition duration-200"> Add to Cart </button> </div> </div>
Tailwind CSS를 사용하여 어두운 모드에서 설계된 반응형 '장바구니에 추가' 버튼은 호버 효과 및 어두운 테마를 지원합니다.
<div class="flex items-center justify-center min-h-screen bg-gray-900 text-white"> <div class="flex flex-col items-center bg-gray-800 p-6 rounded-lg shadow-lg"> <img src="https://picsum.photos/200/300" alt="Product Image" class="w-full h-auto rounded-lg mb-4" /> <h2 class="text-lg font-semibold mb-2">Product Name</h2> <p class="text-gray-400 mb-4">Short description of the product goes here.</p> <div class="flex items-center justify-between w-full"> <span class="text-xl font-bold">$19.99</span> <button class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded transition duration-300 ease-in-out"> Add to Cart </button> </div> </div> </div>
Tailwind CSS로 디자인된 레트로/빈티지 '장바구니에 담기' 버튼 구성 요소로, 반응형 디자인과 어두운 테마를 지원합니다.
<div class="flex flex-col items-center justify-center p-8 bg-white dark:bg-gray-800 rounded-lg shadow-lg"> <img src="https://picsum.photos/200/100?random=1" alt="Product Image" class="w-full h-auto rounded-md mb-4"> <h2 class="text-2xl font-bold text-gray-800 dark:text-white mb-2">Retro Product Name</h2> <p class="text-gray-600 dark:text-gray-300 mb-4">This is a brief description of the retro product.</p> <div class="flex items-center space-x-2"> <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User Avatar" class="w-10 h-10 rounded-full border-2 border-gray-300 dark:border-gray-600"> <button class="px-4 py-2 font-semibold text-white bg-blue-600 rounded-lg shadow hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400 dark:bg-blue-700 dark:hover:bg-blue-800 dark:focus:ring-blue-600">Add to Cart</button> </div> </div>