X Enterprises

nuxt-x-cards

Premium card component library for Nuxt 4 — 12 auto-imported components with cinematic image filters, warm neutral surfaces, and WCAG AA accessible design.

nuxt-x-cards

Premium card component library for Nuxt 4. Ships 12 auto-imported components covering heroes, features, media, product showcases, team members, reviews, testimonials, pricing, and comparison tables — all sharing a unified Oura/Rivian-inspired design language: warm neutral surfaces, cinematic image filters, 4px-grid spacing, and WCAG AA contrast.

Installation

npm install @xenterprises/nuxt-x-cards
// nuxt.config.ts
export default defineNuxtConfig({
  extends: ["@xenterprises/nuxt-x-cards"],
});

What the layer provides

Components (auto-imported, XCard prefix)

ComponentDescription
<XCardHeroFullscreen />Full-viewport hero with cinematic overlay and CTA buttons.
<XCardHeroSplit />Split-layout hero — image one side, editorial text the other.
<XCardFeature />Feature card supporting icon, image, stat, and filter variants.
<XCardGrid />Responsive grid wrapper for feature card collections.
<XCardMedia />Full-bleed media card with gradient overlay and CTA.
<XCardImageFilter />Before/after image filter showcase with keyboard/touch accessibility.
<XCardProduct />Product card with color swatch switcher and color-change emit.
<XCardTeam />Team member portrait card with social links.
<XCardReview />Multi-source review card (Google, Yelp, Trustpilot, App Store).
<XCardTestimonial />Editorial testimonial card with serif quote and portrait.
<XCardPricing />Pricing tier card with feature list and highlighted state.
<XCardComparison />"Us vs Them" comparison table with check/value rows.

Composables

useXCards()

Returns the merged layer configuration (consumer overrides deep-merged over defaults via defu). Use it to read design tokens in your own components.

const config = useXCards();
// config.colors.primary → "cream"
// config.defaults.filter → "cinematic"
// config.fonts.serif → "'Playfair Display', ..."

Returns XCardsConfig:

PropertyTypeDescription
colors.primarystringPrimary color name ("cream" default).
colors.neutralstringNeutral color name ("olive" default).
colors.accentsobject{ gold, goldHover, blue, green } hex values.
fonts.sansstringSans-serif font stack.
fonts.serifstringSerif font stack (Playfair Display).
fonts.displaystringDisplay font stack.
fonts.googleFontsUrlstringGoogle Fonts URL to inject.
radius.cardstringCard border radius.
radius.panelstringPanel border radius.
spacing.baseUnitnumberGrid base unit in px (default 4).
defaults.filterstringDefault image filter: "cinematic", "moody", "golden", "cool", "dramatic", or "none".
defaults.overlaystringDefault overlay style.
defaults.mediaAspectRatiostringDefault media aspect ratio.
defaults.productAspectRatiostringDefault product aspect ratio.
brand.appNamestringApp name used in component titles.
brand.logoIconstringIconify icon class for the logo.

Configuration

Override any token by adding an x.cards key to app.config.ts:

// app.config.ts
export default defineAppConfig({
  x: {
    cards: {
      colors: {
        primary: "stone",
        accents: {
          gold: "#F5C518",
        },
      },
      defaults: {
        filter: "moody",
      },
      brand: {
        appName: "My Brand",
        logoIcon: "i-lucide-star",
      },
    },
  },
});

Environment Variables

None required.

Minimal Usage Example

<template>
  <!-- Hero section -->
  <XCardHeroFullscreen
    title="Built for speed"
    subtitle="The fastest car we've ever made"
    image="/hero.jpg"
    filter="cinematic"
    :ctas="[
      { label: 'Order Now', href: '/order', variant: 'primary' },
      { label: 'Learn More', href: '/specs', variant: 'ghost' },
    ]"
  />

  <!-- Feature grid -->
  <XCardGrid>
    <XCardFeature
      v-for="f in features"
      :key="f.title"
      :title="f.title"
      :description="f.description"
      :icon="f.icon"
      layout="icon"
    />
  </XCardGrid>

  <!-- Pricing -->
  <XCardPricing
    title="Pro"
    price="$49"
    period="/ month"
    :features="['Unlimited projects', 'Priority support', 'API access']"
    :highlighted="true"
    cta-label="Get started"
    cta-href="/signup"
  />
</template>

How It Works

Each component imports useXCards() to read the merged config for its design tokens. useXCards() calls useAppConfig() and reads appConfig.x.cards, then deep-merges it over the built-in defaults using defu — so consumers only need to override the keys they want to change. XCardImageFilter provides keyboard and touch accessibility: click, Enter, and Space all trigger the before/after reveal; touch events are handled via touchstart. All components use CSS custom properties driven by the design tokens so color swaps require no component changes. The layer registers no pages, middleware, or server routes.


AI Context

package: "@xenterprises/nuxt-x-cards"
type: nuxt-layer
prefix: XCard
use-when: >
  Adding premium card components to a Nuxt 4 project. Provides 12 auto-imported
  XCard-prefixed components (heroes, feature grids, media, product showcases, team
  members, reviews, testimonials, pricing, comparison) sharing a warm neutral /
  cinematic design language. Configure design tokens via app.config.ts under x.cards.
  No pages, middleware, or server routes are registered.
Copyright © 2026