All components

Product Cards 06

Product Cards 06 is a React and Tailwind CSS card component from Bund UI, licensed MIT. Copy it and paste it into your project.

Bund UI MIT cards

What it is

Product Cards 06 is a React and Tailwind CSS card component from Bund UI, licensed MIT. Copy it and paste it into your project.

How to use it

Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.

Open in the catalogue

Five free copies a month. No card.

Needs

npm i lucide-react

Licence

This component comes from Bund UI and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.

Product Cards 06

examples/blocks/ecommerce/product-cards/06/page.tsx
import Link from "next/link";
import Image from "next/image";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { HeartIcon, Star } from "lucide-react";

const product = {
  title: "White T-Shirt",
  image: "/images/products/list1.png",
  price: "$29.00",
  badge: "New Season",
  rating: 4,
  colors: ["rgb(119 119 218)", "rgb(218 119 163)", "rgb(125 376 306)", "rgb(255 255 255)"]
};

export type Product = typeof product;

export default function Page() {
  return (
    <div className="mx-auto max-w-150 py-10">
      <Product product={product} />
    </div>
  );
}

const Product = ({ product }: { product: Product }) => (
  <Link href="#" className="group grid rounded-md border md:grid-cols-2">
    <figure className="relative aspect-square w-full overflow-hidden rounded-tl-md rounded-bl-md object-cover">
      <Image
        fill
        className="object-cover transition-all duration-300 group-hover:opacity-80"
        src={product.image}
        alt={product.title}
      />
    </figure>
    <div className="flex flex-col justify-between space-y-2 p-4">
      <div className="space-y-2">
        <Badge variant="secondary">{product.badge}</Badge>
        <p className="text-xl font-semibold">{product.title}</p>
        <div className="flex items-center gap-1">
          {Array(5)
            .fill("")
            .map((_, i) =>
              i < product.rating ? (
                <Star key={i} className="size-4 fill-amber-500 text-amber-500" />
              ) : (
                <Star key={i} className="text-muted-foreground size-4" />
              )
            )}
          <span className="text-muted-foreground ms-1 text-xs">(4.5 out of 5)</span>
        </div>
        <p className="text-muted-foreground lg:text-lg">{product.price}</p>
      </div>

      <div className="flex items-center gap-2">
        {product.colors.map((color, i) => (
          <span
            key={i}
            className="block size-3 rounded-full"
            style={{ backgroundColor: color }}></span>
        ))}
      </div>
      <div className="flex gap-2 space-y-2">
        <Button className="grow">Add to Cart</Button>
        <Button variant="outline">
          <HeartIcon />
        </Button>
      </div>
    </div>
  </Link>
);

Similar components