# ab-lightbox

> Simplest vanilla lightbox you can imagine.

Latest version **1.2.4** (published 2016-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install ab-lightbox
pnpm add ab-lightbox
yarn add ab-lightbox
bun add ab-lightbox
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2016-03-29 |
| First published | 2015-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Antonio Brandao |
| Maintainers | antoniobrandao |
| Keywords | lightbox |

## Links

- npm: https://www.npmjs.com/package/ab-lightbox
- Repository: https://github.com/antoniobrandao/ab-lightbox
- Issues: https://github.com/antoniobrandao/ab-lightbox/issues
- npm.io page: https://npm.io/package/ab-lightbox

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 1.2.4 (latest) — 2016-03-29
- 1.2.3 — 2016-03-29
- 1.2.2 — 2016-03-04
- 1.2.1 — 2015-09-11
- 1.2.0 — 2015-06-22
- 1.1.0 — 2015-06-22
- 1.0.1 — 2015-06-20
- 0.0.2 — 2015-02-10
- 0.0.1 — 2015-02-10

## README

# ab-lightbox

Simplest vanilla lightbox you can imagine.

Features:

- black transparent background (with fade-in)
- loads the given image URL and shows the loaded image (with fade-in)
- limits the size of the image based on screen size and given constraints
- closes the lightbox upon click / touchstart (with fade-out)
- disables scroll while lightbox is visible
- removes DOM elements and event listeners after lightbox is closed

## Install

With [npm](http://npmjs.org) do:

```bash
$ npm install ab-lightbox --save-dev
```

## Usage
	
	var lightbox = require('ab-lightbox');
	
	// default settings are shown.

	lightbox.createlightbox({
		imageURL 				: 'http://lorempixel.com/400/200/',
		closeOnBGClick 			: true,
		fadeOut					: true,
		bgOpacity				: 0.6,
		maxHeightPercent		: 0.6,
		maxWidthPercent			: 0.6,
	});

## License

MIT

---
_Source: https://npm.io/package/ab-lightbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
