amankaushik481

Product Card

Component

About

A storefront product tile with a square image, an optional corner badge like Sale or New, a title, price and an Add to cart button.

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

import * as React from "react";
import { ProductCard } from "@/components/ui/product-card";

export default function ProductCardDemo() {
  const [added, setAdded] = React.useState(false);

  return (
    <div className="flex items-center justify-center p-10">
      <ProductCard
        title="Linen tote"
        price="$48"
        image="https://cdn.21st.dev/assets/mirror/89/898d82d856301a8d047061ac981a577b5a2593f947670a57bad64b60c187ecf4.jpg"
        imageAlt="Natural linen tote bag"
        badge="New"
        onAdd={() => setAdded(true)}
        addLabel={added ? "Added" : "Add to cart"}
      />
    </div>
  );
}

More by amankaushik481

View all
  • Chip Filter

    Chip Filter

    7
  • Icon Button

    Icon Button

    4
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2
  • Floating Label Input

    Floating Label Input

  • Link Preview

    Link Preview

  • Relative Time

    Relative Time

  • Order Summary

    Order Summary