组件 购物车 购物车组件

购物车组件

一种响应式购物车组件,采用拟物化设计,支持黑暗主题,并提供随机占位符图像。

预览

HTML 代码

<div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-5 max-w-md mx-auto">
    <h2 class="text-2xl font-bold mb-4 text-gray-800 dark:text-gray-200">Shopping Cart</h2>
    <div class="space-y-4">
        <div class="flex items-center justify-between p-4 border rounded-lg shadow-md bg-gray-100 dark:bg-gray-700">
            <img src="https://picsum.photos/80" alt="Product" class="w-16 h-16 rounded-md">
            <div class="flex-1 ml-4">
                <h3 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Product Name</h3>
                <p class="text-gray-600 dark:text-gray-400">$29.99</p>
            </div>
            <input type="number" value="1" min="1" class="w-12 border rounded-md text-center bg-gray-200 dark:bg-gray-600">
        </div>
        <div class="flex items-center justify-between p-4 border rounded-lg shadow-md bg-gray-100 dark:bg-gray-700">
            <img src="https://picsum.photos/80" alt="Product" class="w-16 h-16 rounded-md">
            <div class="flex-1 ml-4">
                <h3 class="text-lg font-semibold text-gray-800 dark:text-gray-200">Another Product</h3>
                <p class="text-gray-600 dark:text-gray-400">$49.99</p>
            </div>
            <input type="number" value="1" min="1" class="w-12 border rounded-md text-center bg-gray-200 dark:bg-gray-600">
        </div>
    </div>
    <div class="mt-5 flex justify-between items-center border-t pt-4">
        <h2 class="text-lg font-bold text-gray-800 dark:text-gray-200">Total</h2>
        <p class="text-lg font-bold text-gray-800 dark:text-gray-200">$79.98</p>
    </div>
    <button class="mt-5 w-full bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 rounded transition duration-200">Checkout</button>
</div>

相关组件

购物车组件

拟物化购物车组件,具有柔和的配色方案、响应式和深色模式支持。

打开

购物车组件 - Nature Inspired

一个复杂的、受自然启发的购物车组件,适用于运动/健身应用,具有流畅的线条、互补的配色方案、响应速度和深色模式支持。

打开

3D 购物车组件

一个具有视觉冲击力的购物车组件,具有 3D 设计元素,可创造深度和参与度。使用三色配色方案(原色蓝、鲜艳的红色和琥珀色黄色)来增加视觉趣味。这个复杂的界面包括带有图像的产品列表、数量控制、价格摘要和模拟 3D 运动的悬停效果。完全响应,支持深色主题。该组件专为内容/博客环境而设计,读者可能会在其中购买推荐产品,同时使用内容。

打开