overlay-component

Overlay component

npm install overlay-component
11 downloads in the last week
15 downloads in the last month

Overlay

Page overlay component.

Installation

$ npm install overlay-component

API

overlay([options|element])

Returns a new Overlay.

Options:

  • closable: whether or not a user may click the overlay to close [false]
  • target: target element to overlay [body]

Overlay#show()

Show the overlay.

Overlay#hide()

Hide the overlay.

Events

  • show when the overlay is shown
  • hide when the overlay is hidden
  • close when the overlay is removed (follows hide normally)

License

MIT

npm loves you