X Enterprises

Configuration

app.config.ts and runtimeConfig reference for @xenterprises/nuxt-x-cards.

Configuration

All configuration lives under the x.cards namespace in the consumer's app/app.config.ts (must live in app/, not the project root — a root-level app.config.ts is silently ignored by Nuxt layers). Override only the keys you need; defu deep-merges your values over the built-in defaults shown below.

app.config.ts

export default defineAppConfig({
  x: {
    cards: {
      colors: {
        primary: 'cream',
        neutral: 'olive',
        accents: {
          gold: '#FFAC00',
          goldHover: '#E69B00',
          blue: '#8BA8BD',
          green: '#1BC651',
        },
      },
      fonts: {
        sans: "'Inter', ui-sans-serif, system-ui, sans-serif",
        serif: "'Playfair Display', 'Editorial New', serif",
        display: "'Inter', ui-sans-serif, system-ui, sans-serif",
        googleFontsUrl: 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap',
      },
      radius: {
        card: '0.75rem',
        panel: '1.5rem',
        pill: '9999px',
      },
      spacing: {
        baseUnit: 4,
      },
      defaults: {
        filter: 'cinematic',   // 'cinematic' | 'moody' | 'golden' | 'cool' | 'dramatic' | 'warm' | 'clean' | 'product' | 'none'
        overlay: 'bottom-blur',
        mediaAspectRatio: 'landscape',
        productAspectRatio: 'product',
      },
      brand: {
        appName: 'nuxt-x-cards',
        logoIcon: 'i-lucide-square-x',
      },
    },
  },
})

Schema Reference

KeyTypeDefaultDescription
x.cards.colors.primarystring'cream'Tailwind palette name mapped to primary. Must have shades 50–950 in @theme static.
x.cards.colors.neutralstring'olive'Tailwind palette name mapped to neutral. Must have shades 50–950 in @theme static.
x.cards.colors.accents.goldstring'#FFAC00'Gold accent — star ratings, comparison checkmarks, primary CTAs.
x.cards.colors.accents.goldHoverstring'#E69B00'Gold hover state.
x.cards.colors.accents.bluestring'#8BA8BD'Secondary cool accent.
x.cards.colors.accents.greenstring'#1BC651'Success/positive accent.
x.cards.fonts.sansstring'Inter', ui-sans-serif, system-ui, sans-serifSans-serif font stack used for body and UI.
x.cards.fonts.serifstring'Playfair Display', 'Editorial New', serifSerif font stack used for italic accent phrases and testimonial quotes.
x.cards.fonts.displaystring'Inter', ui-sans-serif, system-ui, sans-serifDisplay font stack (defaults to sans).
x.cards.fonts.googleFontsUrlstringInter + Playfair Display URLGoogle Fonts stylesheet URL — must include all families referenced in the font stacks. Set empty string to disable.
x.cards.radius.cardstring'0.75rem'Border radius applied to cards.
x.cards.radius.panelstring'1.5rem'Border radius applied to panels.
x.cards.radius.pillstring'9999px'Border radius applied to pill/button elements.
x.cards.spacing.baseUnitnumber4Base grid unit in pixels — all padding, margin, and line-height values are multiples of this.
x.cards.defaults.filter'cinematic' | 'moody' | 'golden' | 'cool' | 'dramatic' | 'warm' | 'clean' | 'product' | 'none''cinematic'Default image filter applied to hero and media cards when no explicit filter prop is provided.
x.cards.defaults.overlay'bottom' | 'bottom-fade' | 'bottom-blur' | 'top' | 'full' | 'cinematic' | 'oura' | 'none''bottom-blur'Default gradient overlay applied to image cards when no explicit overlay prop is provided.
x.cards.defaults.mediaAspectRatio'cinematic' | 'landscape' | 'square' | 'portrait''landscape'Default aspect ratio for XCardMedia.
x.cards.defaults.productAspectRatio'square' | 'product' | 'portrait' | 'landscape''product'Default aspect ratio for XCardProduct.
x.cards.brand.appNamestring'nuxt-x-cards'App name shown in footer and SEO.
x.cards.brand.logoIconstring'i-lucide-square-x'Iconify icon class for the logo.

Runtime Config / Environment Variables

None required.


AI Context

package: "@xenterprises/nuxt-x-cards"
config-key: x.cards
use-when: >
  Customising design tokens (colors, fonts, border radius, spacing, image
  filter/overlay defaults, or brand name/logo) for the nuxt-x-cards layer.
  All XCard* components read this config via useXCards() — override only the
  keys you need; defu deep-merges your values over the built-in defaults.
Copyright © 2026