https://github.com/component/overlay
Page overlay component
https://github.com/component/overlay
Last synced: 8 months ago
JSON representation
Page overlay component
- Host: GitHub
- URL: https://github.com/component/overlay
- Owner: component
- Created: 2012-05-04T19:54:49.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2017-05-14T01:12:24.000Z (almost 9 years ago)
- Last Synced: 2024-11-28T15:41:32.225Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://component.github.io/overlay
- Size: 36.1 KB
- Stars: 23
- Watchers: 6
- Forks: 16
- Open Issues: 6
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# Overlay
Page overlay component.
## Installation
```
$ component install component/overlay
```
## 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