Exit-intent popup
A last-chance modal shown when desktop cursor movement suggests someone is about to leave the page.
See it
What it is
An exit-intent popup is a modal shown when desktop pointer movement suggests the visitor is leaving, usually when the cursor crosses the top edge toward the tab bar. The page cannot know that a tab will close; it is making a last-moment guess from behavior.
Reach for it when you have one relevant fallback for an abandoning visitor: save a cart, answer a final objection, or offer an email version of something they were reading. Match the message to the page instead of showing the same coupon everywhere.
Gotcha: the desktop trigger does not translate cleanly to touch screens, and a modal that fires on arrival is not exit intent. Show it at most once per session, never cover required controls, move keyboard focus into it, support Escape, and return focus when it closes.
Ask AI for it
Implement an accessible exit-intent popup for [page] on fine-pointer devices only. Use `window.matchMedia('(pointer: fine)')`, listen for a document `mouseout` whose `clientY` is 0 or less and whose `relatedTarget` is null, and require at least 15 seconds on page before arming it. Store a once-per-session dismissal in `sessionStorage`. Build a real modal with a visible close button, focus trap, Escape support, background inertness, and focus restoration. Do not use `beforeunload`, do not trigger on touch devices, and do not invent the offer copy or discount.