Package detail

exit-intent

danhayden2.9kMIT1.1.0

Exit intent detection library.

exit, intent

readme

Exit Intent

version MIT License Standard Standard Version Size Size gzip

Exit Intent detection library.

Usage

import exitIntent from 'exit-intent'

// Initialise
const removeExitIntent = exitIntent({
  threshold: 50,
  maxDisplays: 2,
  eventThrottle: 100,
  onExitIntent: () => {
    console.log('exit-intent triggered')
  }    
})

// Destroy
removeExitIntent()

Options

threshold (default 20)
maximum distance in pixels from the top of the page to trigger.

maxDisplays (default 1)
maximum number of times to trigger.

eventThrottle (default 200)
event throttle in milliseconds.

onExitIntent (default no-op function)
function to call when an exit intent has been detected.

License

MIT

originally based on https://github.com/richriscunha/Exitent

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.1.0 (2017-09-20)

Features

1.0.0 (2017-09-19)