← catalogo / components/shopping-carts
TW-CO-SC-05
Tailwind Plus
tailwind/ecommerce/components/shopping-carts/05-dialog
@tailwindplus/elements<!-- Include this script tag or install `@tailwindplus/elements` via npm: -->
<!-- <script src="https://cdn.jsdelivr.net/npm/@tailwindplus/elements@1" type="module"></script> -->
<button command="show-modal" commandfor="dialog" class="rounded-md bg-gray-950/5 px-2.5 py-1.5 text-sm font-semibold text-gray-900 hover:bg-gray-950/10">Open dialog</button>
<el-dialog>
<dialog id="dialog" class="fixed inset-0 size-auto max-h-none max-w-none overflow-y-auto bg-transparent backdrop:bg-transparent">
<el-dialog-backdrop class="fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in"></el-dialog-backdrop>
<div tabindex="0" class="flex min-h-full items-stretch justify-center text-center focus:outline-none sm:items-center sm:px-6 lg:px-8">
<el-dialog-panel class="flex w-full transform text-left text-base transition data-closed:scale-105 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in sm:my-8 sm:max-w-3xl">
<form class="relative flex w-full flex-col overflow-hidden bg-white pt-6 pb-8 sm:rounded-lg sm:pb-6 lg:py-8">
<div class="flex items-center justify-between px-4 sm:px-6 lg:px-8">
<h2 class="text-lg font-medium text-gray-900">Shopping Cart</h2>
<button type="button" command="close" commandfor="dialog" class="text-gray-400 hover:text-gray-500">
<span class="sr-only">Close</span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-slot="icon" aria-hidden="true" class="size-6">
<path d="M6 18 18 6M6 6l12 12" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
</div>
<section aria-labelledby="cart-heading">
<h2 id="cart-heading" class="sr-only">Items in your shopping cart</h2>
<ul role="list" class="divide-y divide-gray-200 px-4 sm:px-6 lg:px-8">
<li class="flex py-8 text-sm sm:items-center">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-04-product-03.jpg" alt="Front of zip tote bag with white canvas, black canvas straps and handle, and black zipper pulls." class="size-24 flex-none rounded-lg border border-gray-200 sm:size-32" />
<div class="ml-4 grid flex-auto grid-cols-1 grid-rows-1 items-start gap-x-5 gap-y-3 sm:ml-6 sm:flex sm:items-center sm:gap-0">
<div class="row-end-1 flex-auto sm:pr-6">
<h3 class="font-medium text-gray-900">
<a href="#">Zip Tote Basket</a>
</h3>
<p class="mt-1 text-gray-500">White and black</p>
</div>
<p class="row-span-2 row-end-2 font-medium text-gray-900 sm:order-1 sm:ml-6 sm:w-1/3 sm:flex-none sm:text-right">$140.00</p>
<div class="flex items-center sm:block sm:flex-none sm:text-center">
<div class="inline-grid w-full max-w-16 grid-cols-1">
<select name="quantity-0" aria-label="Quantity, Zip Tote Basket" 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>
<button type="button" class="ml-4 font-medium text-indigo-600 hover:text-indigo-500 sm:mt-2 sm:ml-0">
<span>Remove</span>
</button>
</div>
</div>
</li>
<li class="flex py-8 text-sm sm:items-center">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-04-product-01.jpg" alt="Salmon orange fabric pouch with match zipper, gray zipper pull, and adjustable hip belt." class="size-24 flex-none rounded-lg border border-gray-200 sm:size-32" />
<div class="ml-4 grid flex-auto grid-cols-1 grid-rows-1 items-start gap-x-5 gap-y-3 sm:ml-6 sm:flex sm:items-center sm:gap-0">
<div class="row-end-1 flex-auto sm:pr-6">
<h3 class="font-medium text-gray-900">
<a href="#">Throwback Hip Bag</a>
</h3>
<p class="mt-1 text-gray-500">Salmon</p>
</div>
<p class="row-span-2 row-end-2 font-medium text-gray-900 sm:order-1 sm:ml-6 sm:w-1/3 sm:flex-none sm:text-right">$90.00</p>
<div class="flex items-center sm:block sm:flex-none sm:text-center">
<div class="inline-grid w-full max-w-16 grid-cols-1">
<select name="quantity-1" aria-label="Quantity, Throwback Hip Bag" 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>
<button type="button" class="ml-4 font-medium text-indigo-600 hover:text-indigo-500 sm:mt-2 sm:ml-0">
<span>Remove</span>
</button>
</div>
</div>
</li>
<li class="flex py-8 text-sm sm:items-center">
<img src="https://tailwindcss.com/plus-assets/img/ecommerce-images/shopping-cart-page-04-product-02.jpg" alt="Front of satchel with blue canvas body, black straps and handle, drawstring top, and front zipper pouch." class="size-24 flex-none rounded-lg border border-gray-200 sm:size-32" />
<div class="ml-4 grid flex-auto grid-cols-1 grid-rows-1 items-start gap-x-5 gap-y-3 sm:ml-6 sm:flex sm:items-center sm:gap-0">
<div class="row-end-1 flex-auto sm:pr-6">
<h3 class="font-medium text-gray-900">
<a href="#">Medium Stuff Satchel</a>
</h3>
<p class="mt-1 text-gray-500">Blue</p>
</div>
<p class="row-span-2 row-end-2 font-medium text-gray-900 sm:order-1 sm:ml-6 sm:w-1/3 sm:flex-none sm:text-right">$32.00</p>
<div class="flex items-center sm:block sm:flex-none sm:text-center">
<div class="inline-grid w-full max-w-16 grid-cols-1">
<select name="quantity-2" aria-label="Quantity, Medium Stuff Satchel" 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>
<button type="button" class="ml-4 font-medium text-indigo-600 hover:text-indigo-500 sm:mt-2 sm:ml-0">
<span>Remove</span>
</button>
</div>
</div>
</li>
</ul>
</section>
<section aria-labelledby="summary-heading" class="mt-auto sm:px-6 lg:px-8">
<div class="bg-gray-50 p-6 sm:rounded-lg sm:p-8">
<h2 id="summary-heading" class="sr-only">Order summary</h2>
<div class="flow-root">
<dl class="-my-4 divide-y divide-gray-200 text-sm">
<div class="flex items-center justify-between py-4">
<dt class="text-gray-600">Subtotal</dt>
<dd class="font-medium text-gray-900">$262.00</dd>
</div>
<div class="flex items-center justify-between py-4">
<dt class="text-gray-600">Shipping</dt>
<dd class="font-medium text-gray-900">$5.00</dd>
</div>
<div class="flex items-center justify-between py-4">
<dt class="text-gray-600">Tax</dt>
<dd class="font-medium text-gray-900">$53.40</dd>
</div>
<div class="flex items-center justify-between py-4">
<dt class="text-base font-medium text-gray-900">Order total</dt>
<dd class="text-base font-medium text-gray-900">$320.40</dd>
</div>
</dl>
</div>
</div>
</section>
<div class="mt-8 flex justify-end px-4 sm:px-6 lg:px-8">
<button type="submit" class="rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm 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">Continue to Payment</button>
</div>
</form>
</el-dialog-panel>
</div>
</dialog>
</el-dialog>