X Enterprises
nuxt-x-cards

Feature Cards

Versatile feature card and responsive grid wrapper for content sections.

Feature Cards

XCardFeature and XCardGrid are designed to work together. Use XCardGrid as the outer container to control column count and spacing, then place XCardFeature (or any other card) inside the default slot.

Components

<XCardFeature />

A versatile feature card that adapts to three content layouts — icon badge, full-bleed image, or large stat figure — all driven by which props are provided. Only one of icon or imageUrl renders at a time; icon is suppressed when imageUrl is present. Four visual variants control the card surface.

<!-- Icon layout -->
<XCardFeature
  title="Sleep Intelligence"
  description="Understand your sleep stages, timing, and restoration score every morning."
  icon="i-lucide-moon"
  variant="elevated"
/>

<!-- Stat layout -->
<XCardFeature
  title="Recovery Score"
  description="A daily readiness number built from HRV, resting heart rate, and sleep data."
  :stat="{ value: '94', label: 'Readiness today' }"
  variant="default"
/>

<!-- Image layout -->
<XCardFeature
  title="Activity Tracking"
  description="Automatic workout detection across 40+ activity types."
  image-url="/images/activity.jpg"
  variant="bordered"
/>

<!-- Glass variant (use over image backgrounds) -->
<XCardFeature
  title="Continuous Monitoring"
  description="24/7 heart rate and blood oxygen sensing."
  icon="i-lucide-heart-pulse"
  variant="glass"
/>

Props

PropTypeDefaultDescription
titlestringCard headline (required)
descriptionstringSupporting body text
iconstringIcon name (e.g. i-lucide-moon). Suppressed when imageUrl is present
imageUrlstringFull-bleed image URL. Renders above the text content
stat{ value: string; label: string }Large stat figure with a smaller label below
variant'default' | 'elevated' | 'bordered' | 'glass''default'Card surface style

Variant reference:

VariantSurface
defaultWarm neutral background
elevatedWarm neutral background with drop shadow
borderedTransparent with 1px border
glassFrosted glass — bg-white/15 backdrop-blur-xl with white border

<XCardGrid />

A lightweight CSS grid wrapper. Place any card components inside its default slot. Column breakpoints follow a mobile-first pattern: always 1 column on mobile, then expanding at md and lg.

<XCardGrid :columns="3" gap="md">
  <XCardFeature
    v-for="item in features"
    :key="item.title"
    :title="item.title"
    :description="item.description"
    :icon="item.icon"
  />
</XCardGrid>

Props

PropTypeDefaultDescription
columns1 | 2 | 3 | 43Maximum number of columns at the largest breakpoint
gap'sm' | 'md' | 'lg''md'Gap between grid items

Gap reference (4px grid):

ValueMobileDesktop
sm16px16px
md24px32px
lg32px48px

Column breakpoint reference:

columnsMobilemdlg
11 col1 col1 col
21 col2 col2 col
31 col2 col3 col
41 col2 col4 col

AI Context

package: "nuxt-x-cards"
prefix: XCard
components:
  - XCardFeature
  - XCardGrid
use-when: >
  Use XCardGrid + XCardFeature together for features, benefits, or stats
  sections on marketing and product pages. XCardGrid is a generic slot-based
  wrapper that works with any XCard component, not just XCardFeature.
notes:
  - icon is hidden when imageUrl is provided
  - glass variant is designed for use over dark or image backgrounds
  - stat.value renders at text-4xl / text-5xl; keep values short (e.g. "94", "40+")
Copyright © 2026