0.3.0 • Published 7 years ago

overlay-basis v0.3.0

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

Overlay Basis

Simple overlay component

Works on modern browsers only (uses es6 modules and css custom properties)

Usage

On page load, Overlay Basis creates and appends an #overlay element on the DOM.

You need to add Overlay Basis stylesheet to your own (change this examples with your file path):

if you use less or sass:

@import '~overlay-basis/src/overlay';

or directly in your html file:

<link rel="stylesheet" href="stylesheets/overlay.css">

To create and use the overlay component in your project, import and initialize the library in your javascript file:

import Overlay from 'overlay-basis/src/overlay';
let overlay = new Overlay();
overlay.init()

You can then use its methods:

show()

Nothing really fancy here, the overlay will appear on screen:

overlay.show();

hide()

Hide the overlay:

overlay.hide();

lock()

You can add the .is-locked class to the overlay by calling overlay.lock() before showing it:

overlay.lock();

overlay.show();

By default it will use a 'not-allowed' icon cursor on mouse hovering. The body element of the page will also be locked (not scrollable).

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago