← catalogo / components/shopping-carts
TW-CO-SC-01
Tailwind Plus
tailwind/ecommerce/components/shopping-carts/01-two-column-with-quantity-dropdown
<div class="bg-white">
<div class="mx-auto max-w-2xl px-4 pt-16 pb-24 sm:px-6 lg:max-w-7xl lg:px-8">
<h1 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">Shopping Cart</h1>
<form class="mt-12 lg:grid lg:grid-cols-12 lg:items-start lg:gap-x-12 xl:gap-x-16">
<section aria-labelledby="cart-heading" class="lg:col-span-7">
<h2 id="cart-heading" class="sr-only">Items in your shopping cart</h2>
<ul role="list" class="divide-y divide-gray-200 border-t border-b border-gray-200">
<li class="flex py-6 sm:py-10">
<div class="shrink-0">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-01-product-01.jpg" alt="Front of men's Basic Tee in sienna." class="size-24 rounded-md object-cover sm:size-48" />
</div>
<div class="ml-4 flex flex-1 flex-col justify-between sm:ml-6">
<div class="relative pr-9 sm:grid sm:grid-cols-2 sm:gap-x-6 sm:pr-0">
<div>
<div class="flex justify-between">
<h3 class="text-sm">
<a href="#" class="font-medium text-gray-700 hover:text-gray-800">Basic Tee</a>
</h3>
</div>
<div class="mt-1 flex text-sm">
<p class="text-gray-500">Sienna</p>
<p class="ml-4 border-l border-gray-200 pl-4 text-gray-500">Large</p>
</div>
<p class="mt-1 text-sm font-medium text-gray-900">$32.00</p>
</div>
<div class="mt-4 sm:mt-0 sm:pr-9">
<div class="grid w-full max-w-16 grid-cols-1">
<select name="quantity-0" aria-label="Quantity, Basic Tee" class="col-start-1 row-start-1 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4">
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
</div>
<div class="absolute top-0 right-0">
<button type="button" class="-m-2 inline-flex p-2 text-gray-400 hover:text-gray-500">
<span class="sr-only">Remove</span>
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
<path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" />
</svg>
</button>
</div>
</div>
</div>
<p class="mt-4 flex space-x-2 text-sm text-gray-700">
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5 shrink-0 text-green-500">
<path d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
<span>In stock</span>
</p>
</div>
</li>
<li class="flex py-6 sm:py-10">
<div class="shrink-0">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-01-product-02.jpg" alt="Front of men's Basic Tee in black." class="size-24 rounded-md object-cover sm:size-48" />
</div>
<div class="ml-4 flex flex-1 flex-col justify-between sm:ml-6">
<div class="relative pr-9 sm:grid sm:grid-cols-2 sm:gap-x-6 sm:pr-0">
<div>
<div class="flex justify-between">
<h3 class="text-sm">
<a href="#" class="font-medium text-gray-700 hover:text-gray-800">Basic Tee</a>
</h3>
</div>
<div class="mt-1 flex text-sm">
<p class="text-gray-500">Black</p>
<p class="ml-4 border-l border-gray-200 pl-4 text-gray-500">Large</p>
</div>
<p class="mt-1 text-sm font-medium text-gray-900">$32.00</p>
</div>
<div class="mt-4 sm:mt-0 sm:pr-9">
<div class="grid w-full max-w-16 grid-cols-1">
<select name="quantity-1" aria-label="Quantity, Basic Tee" class="col-start-1 row-start-1 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4">
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
</div>
<div class="absolute top-0 right-0">
<button type="button" class="-m-2 inline-flex p-2 text-gray-400 hover:text-gray-500">
<span class="sr-only">Remove</span>
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
<path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" />
</svg>
</button>
</div>
</div>
</div>
<p class="mt-4 flex space-x-2 text-sm text-gray-700">
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5 shrink-0 text-gray-300">
<path d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-13a.75.75 0 0 0-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 0 0 0-1.5h-3.25V5Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
<span>Ships in 3–4 weeks</span>
</p>
</div>
</li>
<li class="flex py-6 sm:py-10">
<div class="shrink-0">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-01-product-03.jpg" alt="Insulated bottle with white base and black snap lid." class="size-24 rounded-md object-cover sm:size-48" />
</div>
<div class="ml-4 flex flex-1 flex-col justify-between sm:ml-6">
<div class="relative pr-9 sm:grid sm:grid-cols-2 sm:gap-x-6 sm:pr-0">
<div>
<div class="flex justify-between">
<h3 class="text-sm">
<a href="#" class="font-medium text-gray-700 hover:text-gray-800">Nomad Tumbler</a>
</h3>
</div>
<div class="mt-1 flex text-sm">
<p class="text-gray-500">White</p>
</div>
<p class="mt-1 text-sm font-medium text-gray-900">$35.00</p>
</div>
<div class="mt-4 sm:mt-0 sm:pr-9">
<div class="grid w-full max-w-16 grid-cols-1">
<select name="quantity-2" aria-label="Quantity, Nomad Tumbler" class="col-start-1 row-start-1 appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4">
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
</div>
<div class="absolute top-0 right-0">
<button type="button" class="-m-2 inline-flex p-2 text-gray-400 hover:text-gray-500">
<span class="sr-only">Remove</span>
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
<path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" />
</svg>
</button>
</div>
</div>
</div>
<p class="mt-4 flex space-x-2 text-sm text-gray-700">
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5 shrink-0 text-green-500">
<path d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
<span>In stock</span>
</p>
</div>
</li>
</ul>
</section>
<!-- Order summary -->
<section aria-labelledby="summary-heading" class="mt-16 rounded-lg bg-gray-50 px-4 py-6 sm:p-6 lg:col-span-5 lg:mt-0 lg:p-8">
<h2 id="summary-heading" class="text-lg font-medium text-gray-900">Order summary</h2>
<dl class="mt-6 space-y-4">
<div class="flex items-center justify-between">
<dt class="text-sm text-gray-600">Subtotal</dt>
<dd class="text-sm font-medium text-gray-900">$99.00</dd>
</div>
<div class="flex items-center justify-between border-t border-gray-200 pt-4">
<dt class="flex items-center text-sm text-gray-600">
<span>Shipping estimate</span>
<a href="#" class="ml-2 shrink-0 text-gray-400 hover:text-gray-500">
<span class="sr-only">Learn more about how shipping is calculated</span>
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
<path d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM8.94 6.94a.75.75 0 1 1-1.061-1.061 3 3 0 1 1 2.871 5.026v.345a.75.75 0 0 1-1.5 0v-.5c0-.72.57-1.172 1.081-1.287A1.5 1.5 0 1 0 8.94 6.94ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
</a>
</dt>
<dd class="text-sm font-medium text-gray-900">$5.00</dd>
</div>
<div class="flex items-center justify-between border-t border-gray-200 pt-4">
<dt class="flex text-sm text-gray-600">
<span>Tax estimate</span>
<a href="#" class="ml-2 shrink-0 text-gray-400 hover:text-gray-500">
<span class="sr-only">Learn more about how tax is calculated</span>
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
<path d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM8.94 6.94a.75.75 0 1 1-1.061-1.061 3 3 0 1 1 2.871 5.026v.345a.75.75 0 0 1-1.5 0v-.5c0-.72.57-1.172 1.081-1.287A1.5 1.5 0 1 0 8.94 6.94ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" fill-rule="evenodd" />
</svg>
</a>
</dt>
<dd class="text-sm font-medium text-gray-900">$8.32</dd>
</div>
<div class="flex items-center justify-between border-t border-gray-200 pt-4">
<dt class="text-base font-medium text-gray-900">Order total</dt>
<dd class="text-base font-medium text-gray-900">$112.32</dd>
</div>
</dl>
<div class="mt-6">
<button type="submit" class="w-full rounded-md border border-transparent bg-indigo-600 px-4 py-3 text-base font-medium text-white shadow-xs hover:bg-indigo-700 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-50 focus:outline-hidden">Checkout</button>
</div>
</section>
</form>
</div>
</div>