cardsBeginner
Product — Compact
Compact product card for grid-dense listings.
Claude prompt
Drop this into Claude Code, claude.ai, or your AI tool of choice to regenerate or remix this component from scratch.
Build a compact product card with Tailwind: small image, tight name + price layout, no extras. Used in dense product grids (e.g. category listing pages).
Code
html
<!--
Source: Mark Mead (HyperUI)
https://github.com/markmead/hyperui/blob/d09f638255d00e91e95f3cabea4f1d385356dd70/public/examples/marketing/product-cards/5.html
License: MIT
Surfaced via https://vibedex-ryan-staxs-projects-fb4e0931.vercel.app/components/hyperui-product-card-5
-->
<div class="bg-white text-gray-900 min-h-screen flex items-center justify-center">
<div class="mx-auto max-w-md p-6 w-full">
<a href="#" class="group block">
<img
src="https://images.unsplash.com/photo-1592921870789-04563d55041c?auto=format&fit=crop&q=80&w=1160"
alt=""
class="h-87.5 w-full object-cover sm:h-112.5"
/>
<div class="mt-1.5">
<p class="text-xs text-gray-500">Space Grey</p>
<div class="mt-1.5 flex gap-1">
<form>
<fieldset>
<legend class="sr-only">Color</legend>
</fieldset>
<div class="flex flex-wrap justify-center gap-1">
<div>
<input type="checkbox" id="ColorSg" class="sr-only" />
<label for="ColorSg" class="block size-4 cursor-pointer rounded-full bg-[#595759]">
<span class="sr-only"> Space Gray </span>
</label>
</div>
<div>
<input type="checkbox" id="ColorS" class="sr-only" />
<label for="ColorS" class="block size-4 cursor-pointer rounded-full bg-[#d2d3d4]">
<span class="sr-only"> Silver </span>
</label>
</div>
<div>
<input type="checkbox" id="ColorP" class="sr-only" />
<label for="ColorP" class="block size-4 cursor-pointer rounded-full bg-[#d89f97]">
<span class="sr-only"> Pink </span>
</label>
</div>
<div>
<input type="checkbox" id="ColorG" class="sr-only" />
<label for="ColorG" class="block size-4 cursor-pointer rounded-full bg-[#afbfab]">
<span class="sr-only"> Pink </span>
</label>
</div>
<div>
<input type="checkbox" id="ColorSb" class="sr-only" />
<label for="ColorSb" class="block size-4 cursor-pointer rounded-full bg-[#91a5bb]">
<span class="sr-only"> Pink </span>
</label>
</div>
</div>
</form>
</div>
<div class="mt-3 flex justify-between text-sm">
<h3 class="text-gray-900 group-hover:underline group-hover:underline-offset-4">
Small Headphones
</h3>
<p class="text-gray-900">$299</p>
</div>
</div>
</a>
</div>
</div>