🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

use-exit-intent

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-exit-intent

A React Hook to handle exit intent strategies

1.1.0
latest
Source
npm
Version published
Weekly downloads
7K
16.4%
Maintainers
0
Weekly downloads
 
Created
Source

preview

useExitIntent: 🐠 A React Hook to handle exit intent strategies

github url patreon url releases url license url

The Exit Intent strategy is a great way to increase your conversion rate. That strategy is commonly used to show a modal/popup when the user is about to leave your website.

🐠 Features

  • 🚀 Multiple handlers can be registred
  • 🔥 Highly configurable
  • 🧠 Different strategies for Desktop and Mobile
  • ⛔️ Unsubscription support with cookies
  • 🎉 Built with TypeScript

🐠 Installation

In your terminal, run:

  • npm
    npm i use-exit-intent
    
  • pnpm
    pnpm i use-exit-intent
    
  • yarn
    yarn add use-exit-intent
    

🐠 Usage

In your React component:

import { useExitIntent } from 'use-exit-intent'

export function App() {
  const { registerHandler } = useExitIntent()

  registerHandler({
    id: 'openModal',
    handler: () => console.log('Hello from handler!')
  })

  // ...
}

🐠 Knowledge

🐠 Contributing

Note: contributions are always welcome, but always ask first, — please — before work on a PR.

That said, there's a bunch of ways you can contribute to this project, like by:

  • :beetle: Reporting a bug
  • :page_facing_up: Improving this documentation
  • :rotating_light: Sharing this project and recommending it to your friends
  • :dollar: Supporting this project on GitHub Sponsors or Patreon
  • :star2: Giving a star on this repository

License

MIT © Dalton Menezes

Keywords

react

FAQs

Package last updated on 23 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts