X Enterprises
nuxt-x-affiliate

Listing Card

One directory entry as a grid tile, a wide row, or a dense compact line.

Listing Card

One directory entry. Three layouts: card for a grid tile, row for a wide list item, compact for a dense list.

Usually rendered for you by <XAFListingGrid>; use it directly when you want to control the surrounding layout.

Components

<XAFListingCard />

<XAFListingCard :listing="listing" layout="card" />
<XAFListingCard :listing="listing" layout="row" />
<XAFListingCard :listing="listing" layout="compact" :show-tags="false" />

Props

PropTypeDefaultDescription
listingDirectoryListingrequiredThe entry to render
layout'card' | 'row' | 'compact''card'Visual density
showRatingbooleantrueShow the star rating
showTagsbooleantrueShow tag badges
showBadgebooleantrueShow the Featured / Sponsored / New badge

DirectoryListing object

KeyTypeDescription
namestringListing name. Its first letter becomes the fallback monogram
descriptionstringShort blurb
categorystringSingle category, matched exactly by the grid's filter
tagsstring[]Tag badges — 4 shown in card, 2 in row
logostringLogo URL
ratingnumber0–5, rendered by <XAFStarRating>
reviewCountnumberShown beside the rating
badgestringFeatured / Sponsored / New, or any label
tostringDestination for the card's CTA
ctaLabelstringCTA text. Default: "View listing"

Tips

  • A Sponsored badge renders even when showBadge is false. It is a paid-placement disclosure, not decoration — suppressing it while still ranking the listing is the undisclosed material connection the FTC Endorsement Guides prohibit.
  • Ratings go through <XAFStarRating>, so half-stars work. The marketing original compared i <= Math.round(rating), which painted 4.5 as five full stars.

AI Context

component: XAFListingCard
package: "@xenterprises/nuxt-x-affiliate"
use-when: One directory entry, in a grid tile, row, or compact line
Copyright © 2026