X Enterprises
nuxt-x-affiliate

Product Card

Product card for grids — image, badge, title, rating, price, optional inline buy button.

Product Card

The XAFProductCard component renders a single product card for use in product grids on category pages, "Best of" roundups, and search results. Includes the image, an optional badge, the product title, star rating, price, and an optional inline <XAFBuyButton>.

Components

<XAFProductCard />

<XAFProductCard
  name="Logitech MX Keys S"
  image="https://m.media-amazon.com/images/I/mx-keys.jpg"
  :rating="4.6"
  :price="99.99"
  href="/reviews/mx-keys-s"
  description="Best low-profile wireless keyboard for typists."
  badge="Editor's Pick"
  :show-buy-button="true"
  :buy-link="{ merchant: 'amazon', url: 'https://amazon.com/dp/B0CX123', price: 99.99 }"
/>

Props

PropTypeDefaultDescription
namestringrequiredProduct name.
imagestring—Product image URL.
ratingnumber—Star rating 0–5.
pricenumber—Price in dollars.
hrefstring—Card link target. When set, the whole image + title become links.
descriptionstring—Short 1-line description (line-clamped to 2 lines).
showBuyButtonbooleanfalseRender an inline <XAFBuyButton> at the bottom.
buyLinkAffiliateLink—Buy button payload (only used when showBuyButton is true).
badgestring—Small badge in the corner (e.g. "Best Value", "Editor's Pick").

Events

EventPayloadDescription
click{ href? }Fired when the reader clicks the image or title link.

AI Context

component: XAFProductCard
package: "@xenterprises/nuxt-x-affiliate"
use-when: Product card for grids with image, badge, title, rating, price, and optional inline XAFBuyButton.
Copyright © 2026