0.5.6 • Published 3 years ago

nice-popup v0.5.6

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Nice PopUp

Customizable script for displaying images or inline content.

N.B. This is a beta version!

Install

  1. Install package by command npm install nice-popup or yarn add nice-popup
  2. Import styles to your .css @import '~nice-popup/dist/app.css';.

Usage

import {NicePopup} from 'nice-popup';

new NicePopup({
    showArrows: true,
    mouseAdditionalButtons: true,
    keyboard: true
});

Examples

1. Gallery.

Just add data-nice="gallery" attribute to your links.

<a data-nice="gallery" href="pic1.jpg">
   <img src="pic1.jpg">
</a>
<a data-nice="gallery" href="pic2.jpg">
   <img src="pic2.jpg">
</a>
2. Inline content.

Add data-nice="inline" to your link and set href attribute.

<a data-nice="inline" href="#hiddenContent">Open inline content</a>
<div id="hiddenContent" style="display: none;">Hidden text</div>

Options

PropsTypeDefaultDescription
overlayColorString'#0f0f11'Set overlay color
showArrowsBooleantrueShow right and left arrow
arrowsPositionString'top'Set arrows position: top or side
keyboardBooleantrueAllow to control by keyboard arrow keys and escape
mouseAdditionalButtonsBooleantrueAllow to control by mouse additional buttons
draggableBooleantrueAllow to control by dragging
0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago