Add to Cart Button

A responsive Add to Cart button styled with Material Design principles using Tailwind CSS, supporting dark mode themes.

Preview

HTML Code

<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>

Related Components

Add to Cart Button Component

A complex Add to Cart button designed with a retro/vintage aesthetic and a complementary color scheme, suitable for a professional company website. This component supports dark mode and is responsive, utilizing Tailwind CSS for styling.

Open

Add to Cart Button Component

A complex, skeuomorphic 'Add to Cart' button component designed for gaming interfaces, featuring an analogous color scheme and full responsiveness with dark mode support.

Open

Add to Cart Button Component

A nature-inspired, candy-colored 'Add to Cart' button component designed for a forum/community platform, featuring a flowing, organic style. It's responsive and supports dark mode.

Open