X Enterprises
nuxt-x-affiliate

Exit Intent

Exit-intent popup with email capture and cookie-based dismissal — fires when the reader moves toward closing the tab.

Exit Intent

The XAFExitIntent component renders a centered modal that fires when the reader's mouse leaves the top of the viewport (the "I'm about to close this tab" gesture). Captures emails for your newsletter / deals list and persists dismissal via a cookie so it doesn't pester the same visitor.

Components

<XAFExitIntent />

<XAFExitIntent
  title="Don't miss our best deals"
  body="Get our weekly roundup of the top picks + exclusive deals, before everyone else."
  incentive="🎁 10% off your first purchase when you join"
  endpoint="/api/newsletter"
/>

Props

PropTypeDefaultDescription
titlestring"Don't miss our best deals"Modal heading.
bodystringlong defaultBody copy.
incentivestring"🎁 10% off your first purchase when you join"Lead-magnet / incentive line.
endpointstringPOST { email } here.
cookieNamestring"xaf_exit_dismissed"Cookie name for dismissal state.
cookieDaysnumber30Days until dismissal expires.
showDelaynumber0Delay (ms) between exit-intent and modal appearing.

Safe to mount globally. Renders nothing when dismissed or before the user moves toward closing.


AI Context

component: XAFExitIntent
package: "@xenterprises/nuxt-x-affiliate"
use-when: Exit-intent popup with email capture and cookie-based dismissal for newsletter / deals opt-in.
Copyright © 2026