@firstandthird/bounce

2.4.0 • Public • Published

Bounce npm

Simple module to show elements if it appears that user is leaving the page.

Installation

npm install @firstandthird/bounce

Usage

JavaScript

import '@firstandthird/bounce'

HTML

  ...

  <body>
    <div id="modal" data-bounce>
      <div class="overlay" data-bounce-close></div>
      <div class="modal">
        <div class="modal-title">
          <h3>Modal's Title</h3>
        </div>

        <div class="modal-body">
          Modal's body
        </div>
      </div>
    </div>
  </body>
</html>

See the complete example.

Readme

Keywords

Package Sidebar

Install

npm i @firstandthird/bounce

Weekly Downloads

8

Version

2.4.0

License

MIT

Unpacked Size

26.2 kB

Total Files

6

Last publish

Collaborators

  • jga
  • dawnerd
  • ecwillis
  • orthagonal1
  • alaguna
  • aleperez92