Troublete Elements: Overlay
General purpose overlay webcomponent
This component represents a general purpose overlay, that can be used as modal background or similar use-cases where it is neccessary to cover the whole parent element. (!) The only requirement is that the parent element has the style property position
set to relative
.
Install
$ npm i -S troublete-elements-overlay
Demo Usage
... // content
Properties
- hidden (bool) - will determine if overlay is shown
Methods
- show() - will trigger the overlay to show up
- hide() - will trigger the overlay to hide
- toggle() - will toggle the visibility of the overlay
Contribute
- Fork repository & install requirements with
$ npm i
- Change component
- Run tests with
$ npm run test
- If tests pass, file a PR