1.1.2 • Published 1 year ago

@lastofpudge/g-modal v1.1.2

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

GModal

A tiny easy to use 6kb size modal with zero dependencies:

Start

Download the latest version from GitHub or via package managers:

npm i @lastofpudge/g-modal
yarn add @lastofpudge/g-modal

Initialize modal:

new GModal.init(".js-modal", {
  closeDelay: 200,
});

.js-modal is a selector for the modal open button.

You can specify a target for the modal buttons:

data-target="#target"

You also can specify modal open/close effects:

data-open="tmHorizontalIn" data-close="tmHorizontalOut"

To use custom effects, create css animation and call it in data-open/close attributes

Close buttons should contain a class called "js-modal-close".

To change the modal position, you can modify style props: ".g-modal__overlay" "align-items/justify-content" properties.

1.1.1

1 year ago

1.1.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.1.2

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.1

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago