加入购物车按钮

一个响应式的添加到购物车按钮组件,采用拟物风格设计,具有鲜艳的色彩和黑暗主题支持,适用于社交媒体界面.

预览

HTML 代码

<div class="flex items-center justify-center h-screen bg-gray-100 dark:bg-gray-900">
    <div class="bg-white dark:bg-gray-800 shadow-lg rounded-lg p-6 flex flex-col items-center relative overflow-hidden w-80">
        <img class="rounded-md w-full mb-4 h-32 object-cover" src="https://picsum.photos/400/200" alt="Product Image" />
        <h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Product Name</h2>
        <p class="text-gray-600 dark:text-gray-400 mb-4">This is a brief description of the product. It tells you what you can expect from this item.</p>
        <div class="flex items-center justify-between w-full mt-4">
            <span class="text-lg font-bold text-green-500 dark:text-green-400">$49.99</span>
            <button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full transition duration-300 ease-in-out transform hover:scale-105">
                Add to Cart
            </button>
        </div>
        <div class="absolute bottom-0 left-1/2 transform -translate-x-1/2 bg-gray-800 dark:bg-gray-900 rounded-full w-16 h-16 shadow-lg flex items-center justify-center">
            <img class="rounded-full w-12 h-12 border-2 border-white" src="https://randomuser.me/api/portraits/men/65.jpg" alt="User Avatar" />
        </div>
    </div>
</div>

相关组件

添加到购物车按钮组件 - Memphis 灰度天气

一个复杂的“添加到购物车”按钮组件,具有 Memphis 设计灵感,使用灰度配色方案,适用于天气/气候产品。功能包括动态图标、加载状态、脉冲动画和项目计数,所有这些都是响应式的,并支持深色模式。此组件旨在为天气数据订阅或气候相关产品提供有趣而实用的行动号召。

打开

添加到购物车按钮

一个使用Tailwind CSS设计的拟物化“添加到购物车”按钮组件,具有响应式效果和暗黑主题支持。

打开

复古添加到购物车按钮

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

打开