Component
Checkout Summary Card
E-commerce checkout summary with items, pricing breakdown, promo code input, and secure checkout CTA.
- Component
- Tailwind
- HTML
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/cards/checkout-summary-card/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Cards/checkout-summary-card Tailwind/Components/Cards/checkout-summary-card <div class="bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden">
<div class="p-5 border-b border-gray-100 bg-gray-50/50">
<h3 class="font-semibold text-gray-900">Order Summary</h3>
</div>
<div class="p-5 space-y-4">
<div class="flex items-center gap-4">
<img src="https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=128&h=128&fit=crop" alt="Product" class="w-16 h-16 rounded-xl object-cover">
<div class="flex-1">
<h4 class="font-medium text-gray-900">Premium Headphones</h4>
<p class="text-sm text-gray-500">Wireless • Black</p>
</div>
<p class="font-semibold text-gray-900">$249.00</p>
</div>
<div class="flex items-center gap-4">
<img src="https://images.unsplash.com/photo-1556228720-195a672e8a03?w=128&h=128&fit=crop" alt="Product" class="w-16 h-16 rounded-xl object-cover">
<div class="flex-1">
<h4 class="font-medium text-gray-900">Leather Watch</h4>
<p class="text-sm text-gray-500">Classic • Brown</p>
</div>
<p class="font-semibold text-gray-900">$189.00</p>
</div>
<hr class="border-gray-100">
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<span class="text-gray-500">Subtotal</span>
<span class="text-gray-900">$438.00</span>
</div>
<div class="flex justify-between">
<span class="text-gray-500">Shipping</span>
<span class="text-green-600">Free</span>
</div>
<div class="flex justify-between">
<span class="text-gray-500">Tax (8%)</span>
<span class="text-gray-900">$35.04</span>
</div>
</div>
<hr class="border-gray-100">
<div class="flex justify-between items-center">
<span class="font-semibold text-gray-900">Total</span>
<div class="text-right">
<span class="text-2xl font-bold text-gray-900">$473.04</span>
</div>
</div>
<div class="pt-4">
<div class="flex gap-3">
<div class="flex-1 relative">
<input type="text" placeholder="Promo code" class="w-full px-4 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<button class="absolute right-3 top-1/2 -translate-y-1/2 text-blue-600 text-sm font-medium hover:text-blue-700">Apply</button>
</div>
</div>
</div>
<button class="w-full py-4 bg-blue-600 text-white font-semibold rounded-xl hover:bg-blue-700 transition-colors mt-2">
Proceed to Checkout
</button>
<div class="flex items-center justify-center gap-4 mt-4 text-xs text-gray-400">
<div class="flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/>
</svg>
<span>Secure checkout</span>
</div>
<span>•</span>
<span>256-bit SSL</span>
</div>
</div>
</div> # Checkout Summary Card
Order / checkout summary card with line items and totals.
## Preview
Open `preview.html` for a standalone demonstration.
## Features
- Line items and totals
- Clear price hierarchy
## Usage
```bash
npx devsnips add Tailwind/Components/Cards/checkout-summary-card
```
Copy from `code.html`.
## Customization
- Typography for prices, spacing, borders
## Accessibility
- Use semantic text for amounts; avoid image-only prices
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` · `preview.html` · `metadata.json` · `README.md` 75 lines UTF-8 · LF · Spaces: 2
Continue browsing