X Enterprises
nuxt-x-affiliate

Content Card

Reusable review/article card — NuxtLink-wrapped with meta, optional rating, price line, and CTA.

Content Card

The XAFContentCard component is a unified card for both reviews and articles on listing pages. Switches between kind="review" (with brand pill, star rating, "From $X" price line) and kind="article" (with date pill), so the same component powers both your /reviews and /blog indexes.

Components

<XAFContentCard />

<XAFContentCard
  kind="review"
  title="Logitech MX Keys S review"
  href="/reviews/mx-keys-s"
  category="Logitech"
  :rating="4.6"
  :price="99.99"
  image="/covers/mx-keys-s.webp"
  image-alt="Logitech MX Keys S on a desk"
  description="The best low-profile wireless keyboard for typists."
/>

<XAFContentCard
  kind="article"
  title="How we test mechanical keyboards"
  href="/articles/how-we-test-keyboards"
  date="2026-01-15"
  image="/covers/how-we-test.webp"
  image-alt="Hands on a keyboard during a typing test"
  description="A behind-the-scenes look at our testing methodology."
/>

Props

PropTypeDefaultDescription
kind'review' | 'article'requiredCard variant. Controls top-row, price line, heading tag.
titlestringrequiredCard title.
hrefstringrequiredLink target — passed to NuxtLink.
categorystringBrand / category label (reviews only).
ratingnumberStar rating 0–5 (reviews only).
pricenumberBuild-time-captured price (reviews only). Rendered via useAffiliateContent().formatPrice.
datestringISO publish date (articles only).
metastringper-kind defaultSecondary meta line. Empty string suppresses.
descriptionstringShort excerpt / teaser.
ctaLabelstringper-kind defaultCTA text (defaults to "Read review →" / "Read article →").
imagestringOptional cover image URL. Full URL or /public/-relative path. Renders as a thumbnail above the card body when present. New in v0.6.0.
imageAltstringfalls back to titleAlt text for image. Always pass an explicit alt for non-decorative editorial imagery. New in v0.6.0.
imageAspect'video' | 'square' | 'auto''video'Aspect ratio for image. video = 16:9, square = 1:1, auto preserves natural ratio with object-contain. New in v0.6.0.
imageLoading'lazy' | 'eager''lazy'loading attribute on the <img>. Pass 'eager' for the first 1–3 cards on a listing page so the LCP image isn't lazy-loaded. New in v0.6.0.

The heading tag is <h2> for articles and <h3> for reviews — so the card sits correctly inside both listing surfaces and review sections.


AI Context

component: XAFContentCard
package: "@xenterprises/nuxt-x-affiliate"
use-when: Reusable review/article card with meta, optional rating, price line, and CTA for listing pages.
Copyright © 2026