Browse components

component

Product Card

Thumbnail, title and price inside a bubble. The card that turns a chat into a storefront.

Install

npx shadcn@latest add https://whatsapp-components.crafter.run/r/product-card.json

Writes 4 files into your project, and installs clsx and tailwind-merge.

Preview

¡Sí! Nos queda en stock 😍 Te lo muestro:Perfume VioletaPerfume Violeta · 50 ml$ 65.000
Kit descubrimiento$ 38.000Cinco muestras de 2 ml, una por familia olfativa.
demos/product-card.tsx
import { MessageBubble } from "@/registry/whatsapp/message-bubble";
import { MessageMeta } from "@/registry/whatsapp/message-meta";
import { ProductCard } from "@/registry/whatsapp/product-card";

export default function Demo() {
  return (
    <div className="flex flex-col gap-3">
      <MessageBubble
        direction="out"
        meta={
          <MessageMeta timestamp={new Date(2025, 0, 6, 20, 2)} status="read" />
        }
      >
        <span className="mb-1.5 block">
          ¡Sí! Nos queda en stock 😍 Te lo muestro:
        </span>
        <ProductCard
          title="Perfume Violeta · 50 ml"
          price="$ 65.000"
          imageUrl="/perfume.svg"
          imageAlt="Perfume Violeta"
        />
      </MessageBubble>

      <MessageBubble direction="in">
        <ProductCard
          stacked
          title="Kit descubrimiento"
          price="$ 38.000"
          imageUrl="/perfume.svg"
          description="Cinco muestras de 2 ml, una por familia olfativa."
        />
      </MessageBubble>
    </div>
  );
}

Props

Read from ProductCardProps in the component source at build time.

ProductCardProps
PropTypeDefault
pricerequiredstring—
titlerequiredstring—
action

A button or link under the price.

ReactNode—
classNamestring—
descriptionstring—
imageAltstring""
imageUrlstring—
priceClassNamestring—
stacked

Stacks the image above the text instead of beside it.

booleanfalse

Files

  • registry/whatsapp/product-card.tsx
  • registry/whatsapp/cn.ts
  • registry/whatsapp/whatsapp.css
  • LICENSE