statsBeginner
Stat Card
A KPI card with metric, label, and a trend delta.
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 KPI stat card with Tailwind: a label on top (small uppercase, muted), a large numeric value below, and a delta line at the bottom showing percent change with an up/down arrow icon (green for up, rose for down). Card has rounded corners, padding, and a subtle border.
Code
html
<!--
Source: Mark Mead (HyperUI)
https://github.com/markmead/hyperui/blob/d09f638255d00e91e95f3cabea4f1d385356dd70/public/examples/application/stats/1.html
License: MIT
Surfaced via https://vibedex-ryan-staxs-projects-fb4e0931.vercel.app/components/hyperui-app-stats-card
-->
<div class="bg-white text-gray-900 min-h-screen flex items-center justify-center">
<div class="mx-auto flex max-w-lg flex-col gap-4 p-6 w-full">
<article class="flex flex-col gap-4 rounded-lg border border-gray-100 bg-white p-6">
<div class="inline-flex gap-2 self-end rounded-sm bg-green-100 p-1 text-green-600">
<svg
xmlns="http://www.w3.org/2000/svg"
class="size-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"
/>
</svg>
<span class="text-xs font-medium"> 67.81% </span>
</div>
<div>
<strong class="block text-sm font-medium text-gray-500"> Profit </strong>
<p>
<span class="text-2xl font-medium text-gray-900"> $404.32 </span>
<span class="text-xs text-gray-500"> from $240.94 </span>
</p>
</div>
</article>
<article class="flex flex-col gap-4 rounded-lg border border-gray-100 bg-white p-6">
<div class="inline-flex gap-2 self-end rounded-sm bg-red-100 p-1 text-red-600">
<svg
xmlns="http://www.w3.org/2000/svg"
class="size-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 17h8m0 0V9m0 8l-8-8-4 4-6-6"
/>
</svg>
<span class="text-xs font-medium"> 67.81% </span>
</div>
<div>
<strong class="block text-sm font-medium text-gray-500"> Profit </strong>
<p>
<span class="text-2xl font-medium text-gray-900"> $240.94 </span>
<span class="text-xs text-gray-500"> from $404.32 </span>
</p>
</div>
</article>
</div>
</div>