About
A product card with an image gallery, colour and size pickers, quantity stepper, wishlist heart and an Add to cart button that shows adding and added states. Includes built-in SVG artwork, so it works with no image files.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Product Card to your project and fits it to your theme.
Code
How Product Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
// This is a file with a demo for your component
// That's what users will see in the preview
// Create new files in this directory to add more demos
"use client";
import * as React from "react";
import { Component, type CartSelection } from "@/components/ui/product-card";
export default function DemoOne() {
const [last, setLast] = React.useState("");
return (
<div className="flex min-h-[640px] w-full flex-col items-center justify-center gap-5 bg-background px-4 py-12 text-foreground">
<Component
onAddToCart={async (item: CartSelection) => {
// Pretend the server takes a moment
await new Promise((resolve) => setTimeout(resolve, 600));
setLast(item.quantity + " x size " + item.size + " (" + item.colorId + ")");
}}
/>
<p className="h-5 text-sm text-muted-foreground" role="status">
{last ? "Cart updated: " + last : ""}
</p>
</div>
);
}
















