← catalogo / components/shopping-carts
TW-CO-SC-06
Tailwind Plus
tailwind/ecommerce/components/shopping-carts/06-popover
@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> -->
<header class="relative bg-white">
<nav aria-label="Top" class="mx-auto max-w-7xl sm:px-6 lg:px-8">
<div class="relative border-b border-gray-200 px-4 pb-14 sm:static sm:px-0 sm:pb-0">
<div class="flex h-16 items-center justify-between">
<!-- Logo -->
<div class="flex flex-1">
<a href="#">
<span class="sr-only">Your Company</span>
<img src="https://tailwindcss.com/plus-assets/img/logos/mark.svg?color=indigo&shade=600" alt="" class="h-8 w-auto" />
</a>
</div>
<div class="absolute inset-x-0 bottom-0 overflow-x-auto border-t border-gray-200 sm:static sm:border-t-0">
<div class="flex h-14 items-center space-x-8 px-4 sm:h-auto">
<a href="#" class="text-sm font-medium text-gray-700 hover:text-gray-800">Women</a>
<a href="#" class="text-sm font-medium text-gray-700 hover:text-gray-800">Men</a>
<a href="#" class="text-sm font-medium text-gray-700 hover:text-gray-800">Company</a>
<a href="#" class="text-sm font-medium text-gray-700 hover:text-gray-800">Stores</a>
</div>
</div>
<div class="flex flex-1 items-center justify-end">
<!-- Search -->
<a href="#" class="p-2 text-gray-400 hover:text-gray-500">
<span class="sr-only">Search</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="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
<!-- Cart -->
<div class="ml-4 flow-root text-sm lg:relative lg:ml-8">
<button popovertarget="shopping-cart-popover" class="group -m-2 flex items-center p-2">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-slot="icon" aria-hidden="true" class="size-6 shrink-0 text-gray-400 group-hover:text-gray-500">
<path d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<span class="ml-2 text-sm font-medium text-gray-700 group-hover:text-gray-800">0</span>
<span class="sr-only">items in cart, view bag</span>
</button>
<el-popover id="shopping-cart-popover" anchor="bottom end" popover class="w-full overflow-visible bg-white pb-6 shadow-lg transition transition-discrete backdrop:bg-transparent open:block data-closed:opacity-0 data-enter:duration-200 data-enter:ease-out data-leave:duration-150 data-leave:ease-in max-lg:[--anchor-gap:--spacing(3.5)] sm:px-2 lg:-mr-1.5 lg:w-80 lg:rounded-lg lg:ring-1 lg:ring-black/5 lg:[--anchor-gap:--spacing(1)]">
<h2 class="sr-only">Shopping Cart</h2>
<form class="mx-auto max-w-2xl px-4">
<ul role="list" class="divide-y divide-gray-200">
<li class="flex items-center py-6">
<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-16 flex-none rounded-md border border-gray-200" />
<div class="ml-4 flex-auto">
<h3 class="font-medium text-gray-900">
<a href="#">Throwback Hip Bag</a>
</h3>
<p class="text-gray-500">Salmon</p>
</div>
</li>
<li class="flex items-center py-6">
<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-16 flex-none rounded-md border border-gray-200" />
<div class="ml-4 flex-auto">
<h3 class="font-medium text-gray-900">
<a href="#">Medium Stuff Satchel</a>
</h3>
<p class="text-gray-500">Blue</p>
</div>
</li>
<li class="flex items-center py-6">
<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-16 flex-none rounded-md border border-gray-200" />
<div class="ml-4 flex-auto">
<h3 class="font-medium text-gray-900">
<a href="#">Zip Tote Basket</a>
</h3>
<p class="text-gray-500">White and black</p>
</div>
</li>
</ul>
<button type="submit" class="w-full 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">Checkout</button>
<p class="mt-6 text-center">
<a href="#" class="text-sm font-medium text-indigo-600 hover:text-indigo-500">View Shopping Bag</a>
</p>
</form>
</el-popover>
</div>
</div>
</div>
</div>
</nav>
</header>