组件 添加到购物车按钮 添加到购物车按钮

添加到购物车按钮

一个响应式的添加到购物车按钮组件,采用拟物化元素,生动的色彩,并支持深色主题,适合博客和内容消费目的。

预览

HTML 代码

<div class="flex flex-col items-center justify-center p-6 bg-white rounded-lg shadow-lg dark:bg-gray-800 transition duration-300">
    <img src="https://picsum.photos/200/100" alt="Product Image" class="w-full h-32 rounded-lg shadow-md mb-4">
    <h2 class="text-lg font-bold text-gray-800 dark:text-gray-200 mb-2">Special Product</h2>
    <p class="text-gray-600 dark:text-gray-400 mb-4">This is a great product for your reading material. Click the button below to add it to your cart!</p>
    <button class="bg-gradient-to-r from-blue-500 to-purple-600 text-white font-semibold py-2 px-4 border rounded-lg hover:scale-105 transform transition duration-300 ease-in-out shadow-lg">
        <span class="flex items-center justify-center">
            <img src="https://randomuser.me/api/portraits/men/10.jpg" alt="Avatar" class="w-8 h-8 rounded-full mr-2">
            Add to Cart
        </span>
    </button>
</div>

相关组件

添加到购物车按钮

一个采用材料设计原则、使用 Tailwind CSS 样式的响应式添加到购物车按钮,支持暗模式主题。

打开

复古添加到购物车按钮

响应式“添加到购物车”按钮,具有复古/复古设计、互补配色方案和适度的复杂性,适用于仪表板目的。支持深色模式。

打开

添加到购物车按钮组件

一个为深色模式设计的响应式“添加到购物车”按钮,使用 Tailwind CSS。

打开