nuxt-x-marketing
nuxt-x-marketing
Marketing website layer for Nuxt 4. Provides 38+ XMark-prefixed components with zero required props, dark mode support, responsive design, WCAG 2.0 AA accessibility, and a complete CSS design system (typography, animations, glass effects). Built on Nuxt UI v4.
Installation
npm install @xenterprises/nuxt-x-marketing
// nuxt.config.ts
export default defineNuxtConfig({
extends: "@xenterprises/nuxt-x-marketing",
});
Quick Start
<template>
<div>
<XMarkNavbar :links="navLinks" logo-light="/logo-white.svg" logo-dark="/logo-dark.svg">
<template #actions>
<UButton variant="ghost">Sign In</UButton>
<UButton color="primary">Get Started</UButton>
</template>
</XMarkNavbar>
<XMarkHero
eyebrow="Welcome"
title="Build something amazing"
subtitle="The modern platform for teams."
:buttons="[{ label: 'Get Started', color: 'primary' }, { label: 'Watch Demo', variant: 'outline' }]"
/>
<XMarkSection bg="subtle" padding="xl">
<XMarkFeatures :features="features" layout="grid" :columns="3" />
</XMarkSection>
<XMarkSection bg="default" padding="xl">
<XMarkPricing :plans="pricingPlans" :show-billing-toggle="true" />
</XMarkSection>
<XMarkFooter
logo="/logo.svg"
description="Building the future of modern software."
:social="socialLinks"
:columns="footerColumns"
/>
</div>
</template>
Components
All components are auto-imported with the XMark prefix. Every component works out of the box with zero required props.
Core Layout
| Component | Description |
|---|---|
XMarkNavbar | Fixed navigation with transparent-to-solid scroll transition, mobile menu. |
XMarkSection | Section wrapper with bg variants (default, subtle, elevated, bold), padding, container size, and SVG pattern backgrounds. |
XMarkFooter | Full footer with brand, link columns, social icons, optional newsletter. |
XMarkLegalFooter | Minimal footer with copyright and legal links only. |
XMarkNavbar props: links, logoLight, logoDark, logoAlt, transparent (default true), scrollThreshold (default 100).
XMarkSection props: bg, padding (none/sm/md/lg/xl), container (sm–xl/full), pattern (dots/grid/diagonal/topography/circuit/waves), patternOpacity, bgImage, parallax.
Hero & Landing
| Component | Description |
|---|---|
XMarkHero | Full-screen hero with image/video background, overlay, text alignment, scroll indicator. |
XMarkHero props: imageSrc, videoSrc, eyebrow, title, subtitle, align (left/center/right), verticalAlign (center/bottom), overlay (light/heavy/gradient/none), showScrollIndicator.
<XMarkHero
image-src="/hero.jpg"
eyebrow="Welcome"
title="Build something amazing"
subtitle="The modern platform for teams."
align="left"
overlay="gradient"
:show-scroll-indicator="true"
>
<template #actions>
<UButton size="xl" color="white">Get Started</UButton>
</template>
</XMarkHero>
Content Sections
| Component | Description |
|---|---|
XMarkFeatures | Feature grid/list/alternating with icons or images. Props: features, layout (grid/list/alternating), columns (2/3/4). |
XMarkTestimonials | Testimonial cards in grid or carousel. |
XMarkPricing | Pricing cards with billing toggle and popular badge. |
XMarkComparison | Feature comparison table across plans. |
XMarkNewsletter | Email signup with variants (default, minimal, inline). |
XMarkPricing props: plans, highlighted, showBillingToggle (default false), yearlyDiscount (default 20). Emits: select.
Blog Components
| Component | Description |
|---|---|
XMarkBlogCard | Blog post card with image, excerpt, author, date, category. Props: post, variant. |
XMarkBlogList | Blog listing grid. Props: posts, columns, showFeatured. |
XMarkBlogDetail | Full post view with author, share buttons, related posts. |
XMarkBlogSidebar | Sidebar with search, categories, tags, recent posts. |
XMarkBlogAuthor | Author bio with social links. Props: author, variant (inline/sm/full/card). |
XMarkBlogNavigation | Previous/next post navigation. |
XMarkBlogCTA | In-article newsletter signup. Props: title, description, variant (featured/…). |
UI Elements
| Component | Description |
|---|---|
XMarkBadge | Trust badges with presets (no-credit-card, cancel-anytime, money-back, free-trial, secure) or custom icon/label. |
XMarkGlassCard | Glassmorphism card. Props: blur, opacity. |
XMarkPromoCard | Promotional card with image and CTA. |
XMarkGlowDivider | Glowing section divider. Props: color, intensity. |
XMarkPatternBg | SVG background patterns. Props: pattern (dots/grid/diagonal/topography/circuit/waves), opacity. |
XMarkSectionStitch | Section divider shapes. Props: shape (angle/wave/curve/triangle/zigzag), position (top/bottom), flip. |
Modals & Overlays
| Component | Description |
|---|---|
XMarkVideoModal | Video lightbox for YouTube, Vimeo, and direct URLs. Props: v-model, url, title. |
XMarkImageLightbox | Image gallery lightbox with keyboard nav. Props: v-model, images, startIndex. |
XMarkFeatureModal | Feature detail modal. Props: v-model, feature. |
Notifications & Banners
| Component | Description |
|---|---|
XMarkAnnouncementBar | Dismissible top announcement. Props: message, linkText, linkUrl, variant, dismissible. |
XMarkCookieBanner | Cookie consent banner with accept/decline. |
XMarkCookieToast | Cookie toast notification. |
XMarkGDPR | GDPR cookie preference modal with category toggles. |
XMarkSocialProofToast | Social proof notification toasts. Props: notifications, interval, position. |
Affiliate & Review Components
For affiliate marketing, product review sites, and comparison posts.
| Component | Description |
|---|---|
XMarkAffiliateDisclosure | FTC/Amazon affiliate disclosure. Variants: subtle, banner, inline. |
XMarkAffiliateProductCard | Product card with rating, price, pros/cons, buy CTA. Layouts: card, row, compact. |
XMarkAffiliateProductGrid | Grid of product cards with auto rank badges (#1/#2/#3). |
XMarkAffiliateProductDetail | Full product review layout: image gallery, editorial score, specs, sticky buy box. Slots: buy-box, after-verdict, sidebar. |
XMarkAffiliateComparisonTable | Side-by-side product comparison with best-value highlighting. |
XMarkAffiliateProductCard props: product ({ name, image, price, rating, reviewCount, pros, cons, affiliateUrl, affiliateTag, badge }), layout, showPros, showCons, showRating, showPrice, buttonLabel.
Utilities
| Component | Description |
|---|---|
XMarkBackToTop | Scroll-to-top button. Props: showAfter, smooth. |
XMarkPopupChat | Chat widget trigger. Props: provider, config. |
Composables
All composables are SSR-safe and auto-imported.
| Composable | Description |
|---|---|
useScrollReveal(options?) | Intersection Observer that adds is-visible to [data-reveal], .xFadeUp, .xFadeIn, .xFadeLeft, .xFadeRight, .xScale, .xFadeUp-stagger elements on scroll. |
useParallax(options?) | Parallax effect for .xParallax[data-parallax-speed] elements via requestAnimationFrame. |
useElementParallax(speed?) | Individual element parallax via template ref. Returns { elementRef }. |
useStaggerReveal(selector, delay?) | Adds incremental transition-delay to [data-reveal] children. |
useXBlog() | Blog data fetching composable. Reads runtimeConfig.public.apiURL. |
// Scroll animations are initialized globally by marketing.client.ts plugin.
// Use directly in components for fine-grained control:
const { elementRef } = useElementParallax(0.3);
Configuration
// app.config.ts
export default defineAppConfig({
xMarketing: {
name: "X Enterprises",
config: {
markerProjectId: "your-marker-project-id", // Optional: Marker.io integration
},
},
});
CSS Design System
The layer ships x-marketing.css with utility classes auto-available in all components.
Typography
| Class | Description |
|---|---|
xText-display | Display heading — clamp(3rem, 8vw, 6rem), weight 700 |
xText-headline | Section headline — clamp(2rem, 5vw, 3.5rem), weight 600 |
xText-title | Card/feature title — clamp(1.25rem, 3vw, 1.75rem), weight 600 |
xText-body | Body text — 1.125rem, line-height 1.7 |
xText-small | Captions/labels — 0.875rem |
xText-eyebrow | Uppercase label — 0.75rem, 0.1em tracking |
xText-gradient | Gradient text using primary color |
Scroll Animations
| Class | Description |
|---|---|
xFadeUp | Fade in + slide up 24px on scroll |
xFadeIn | Simple fade in on scroll |
xFadeLeft / xFadeRight | Fade in from left/right 24px |
xScale | Scale in (0.95 → 1) on scroll |
xFadeUp-stagger | Stagger children with 100ms delay increments |
All animations respect prefers-reduced-motion: reduce.
Hover Effects
| Class | Description |
|---|---|
xHover-lift | Lift up 4px + shadow on hover |
xHover-grow | Scale to 1.02 on hover |
xHover-glow | Primary color glow shadow on hover |
xHover-zoom | Zoom child <img> to 1.08 on hover |
Glass & Glow
| Class | Description |
|---|---|
xGlass | Glassmorphism — 20px blur, white/70 bg, border, shadow |
xGlass-subtle / xGlass-heavy | 8px / 40px blur variants |
xGlow-divider | Glowing horizontal divider |
xGlow-border | Glowing gradient border |
Environment Variables
| Variable | Required | Description |
|---|---|---|
NUXT_PUBLIC_API_URL | No | Base API URL for useXBlog() blog composable. |
No required environment variables. All configuration is via app.config.ts.
How It Works
- Component registration: All components in
app/components/X/Mark/are auto-imported with theXMarkprefix. Branded X Enterprises components live underX/X/with theXXprefix. - Design system:
app/assets/css/x-marketing.cssdefines CSS custom properties for typography scale, spacing, colors, shadows, and motion. Uses Tailwind CSS v4 with@theme staticfor custom color palettes. Dark mode via.darkselector. - Animations: A client-side plugin (
marketing.client.ts) auto-initializesuseScrollReveal()anduseParallax()globally on mount. Components can also call these composables directly for fine-grained control. - Configuration:
app.config.tsdefines thexMarketingnamespace with Nuxt UI theme overrides. Consumer apps deep-merge their ownapp.config.tsto customize. - Type system:
app/types/marketing.d.tsexports interfaces for all data structures (BlogPost, Feature, PricingPlan, Testimonial, AffiliateProduct, etc.).
Layer Architecture
| Path | Purpose |
|---|---|
nuxt.config.ts | Registers @nuxt/ui, loads CSS, enables SSR and devtools |
app/app.config.ts | Default xMarketing config + Nuxt UI theme overrides |
app/assets/css/x-marketing.css | Full design system: colors, typography, animations, glass effects |
app/components/X/Mark/ | Generic XMark* marketing components |
app/composables/ | useScrollReveal, useParallax, useElementParallax, useStaggerReveal, useXBlog |
app/plugins/marketing.client.ts | Client plugin: auto-initializes scroll/parallax globally |
app/types/marketing.d.ts | TypeScript interfaces for all data structures |
app/pages/ | Default blog pages (/blog, /blog/[...slug]) |
Consumer apps can override app.vue to replace the default shell, or override any page by creating their own pages/blog/index.vue.
AI Context
package: "@xenterprises/nuxt-x-marketing"
type: nuxt-layer
prefix: XMark
use-when: >
Building a marketing website with Nuxt 4. Provides 38+ XMark-prefixed components
(hero, features, pricing, testimonials, blog, affiliate, cookie/GDPR, modals) with
zero required props, dark mode, WCAG 2.0 AA accessibility, and a full CSS design
system. Includes 5 composables (useScrollReveal, useParallax, useElementParallax,
useStaggerReveal, useXBlog) and default blog pages. Configure via app.config.ts
under xMarketing.
