ショッピングカートに商品を追加するためのボタン
レスポンシブエフェクトとダークテーマのサポートを備えたSkeuomorphicカートに追加ボタン。
<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デザインの[カートに追加]ボタンコンポーネント。
<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でデザインされたSkeuomorphicの「Add to Cart」ボタンコンポーネントで、レスポンシブエフェクトとダークテーマのサポートが特徴です。
<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>