X Enterprises
nuxt-x-cards

Content Cards

Product showcase, team, review, and testimonial card components.

Content Cards

Four components covering the most common social-proof and people content patterns: products with color variants, team member profiles, aggregated review scores, and editorial testimonials.

Components

<XCardProduct />

A product showcase card in the Oura style — warm neutral background, top-mounted image, color swatch row, price, and a ghost CTA. When colors are provided, clicking a swatch updates the displayed image if that color entry has an imageUrl. The aspect ratio of the image container falls back to the global useXCards() productAspectRatio default.

<XCardProduct
  title="Oura Ring Gen 4"
  description="The most accurate health sensor in the most comfortable form factor."
  price="$349"
  image-url="/images/ring-silver.jpg"
  badge="New"
  aspect-ratio="square"
  :colors="[
    { name: 'Silver', hex: '#C0C0C0', imageUrl: '/images/ring-silver.jpg' },
    { name: 'Black', hex: '#1A1A1A', imageUrl: '/images/ring-black.jpg' },
    { name: 'Gold', hex: '#B8963E', imageUrl: '/images/ring-gold.jpg' }
  ]"
  :cta="{ label: 'Shop', to: '/shop/ring' }"
/>

Props

PropTypeDefaultDescription
titlestringProduct name (required)
descriptionstringShort product description, line-clamped to 2 lines
pricestringPrice string (e.g. "$349")
imageUrlstringDefault product image URL (required)
imageAltstringAlt text for the product image
badgestringOptional badge label (e.g. "New", "Best Seller")
colorsArray<{ name: string; hex: string; imageUrl?: string }>Color swatches; clicking swaps the image when imageUrl is set on the color
cta{ label: string; to: string }Ghost CTA button with arrow icon
aspectRatio'square' | 'product' | 'portrait' | 'landscape'global defaultAspect ratio of the image container

<XCardTeam />

A team member profile card with a warm-filtered portrait photo, name, role, optional bio, and social icon links. The portrait renders at aspect-square and uses the filter-x-warm preset automatically. Social links use ghost icon buttons.

<XCardTeam
  name="Dr. Sarah Chen"
  role="Chief Science Officer"
  bio="Former Stanford sleep lab researcher with 15 years studying circadian biology."
  image-url="/images/team/sarah.jpg"
  :socials="[
    { icon: 'i-simple-icons-linkedin', to: 'https://linkedin.com/in/sarahchen', label: 'LinkedIn' },
    { icon: 'i-simple-icons-x', to: 'https://x.com/sarahchen', label: 'X' }
  ]"
/>

Props

PropTypeDefaultDescription
namestringPerson's full name (required)
rolestringJob title or role (required)
biostringShort biography, line-clamped to 2 lines
imageUrlstringPortrait photo URL (required)
imageAltstringAlt text for the portrait
socialsArray<{ icon: string; to: string; label?: string }>Social link buttons; icon is a UIcon name, label sets aria-label

<XCardReview />

A compact review card for aggregated social proof. Displays a platform badge (Google, Yelp, Trustpilot, App Store, or generic), a 5-star rating row, the review text (line-clamped to 4 lines), and a reviewer avatar or initial fallback. The aspectRatio prop is useful when using reviews in a uniform-height grid.

<XCardReview
  review-text="I've tried every sleep tracker on the market. Nothing comes close to the accuracy and the battery life of this ring."
  reviewer-name="Marcus T."
  reviewer-avatar="/images/reviewers/marcus.jpg"
  :rating="5"
  source="appstore"
  date="Jan 2025"
/>

Props

PropTypeDefaultDescription
reviewTextstringThe review body (required)
reviewerNamestringReviewer's display name (required)
reviewerAvatarstringAvatar image URL; falls back to initial letter circle if omitted
rating1 | 2 | 3 | 4 | 5Star rating (required)
source'google' | 'yelp' | 'trustpilot' | 'appstore' | 'generic''generic'Review platform — controls the badge icon and label
datestringDisplay date string (e.g. "Jan 2025")
aspectRatio'auto' | 'square' | '4:3' | '3:4' | '16:9' | '9:16''auto'Card aspect ratio; useful for equal-height grids

<XCardTestimonial />

An editorial testimonial card in the Oura serif pattern. A split two-column layout with a warm-filtered portrait on the left and a large serif italic blockquote on the right. Best used as a full-width card or in a 1-column grid.

<XCardTestimonial
  quote="I stopped relying on how I felt when I woke up. Now I trust my data."
  author="Priya Nair"
  role="Ultra-marathon runner"
  image-url="/images/testimonials/priya.jpg"
/>

Props

PropTypeDefaultDescription
quotestringThe testimonial quote text (required, rendered without surrounding quotes in markup — the template adds them)
authorstringPerson's name (required)
rolestringRole or descriptor below the author name
imageUrlstringPortrait image URL (required)
imageAltstringAlt text for the portrait

AI Context

package: "nuxt-x-cards"
prefix: XCard
components:
  - XCardProduct
  - XCardTeam
  - XCardReview
  - XCardTestimonial
use-when: >
  Use XCardProduct for e-commerce or product showcase sections with color
  variants. Use XCardTeam on about/team pages. Use XCardReview in social proof
  sections — pair with XCardGrid for uniform layout. Use XCardTestimonial for
  full-width editorial customer story sections.
notes:
  - XCardTeam and XCardTestimonial apply filter-x-warm to portrait images automatically
  - XCardProduct image swapping requires imageUrl on each color object
  - XCardReview avatar falls back to an initial-letter circle if reviewerAvatar is omitted
  - XCardTestimonial is best at full width or in a 1-column XCardGrid
Copyright © 2026