# light-it-up

> Draw SVG lightning bolts on to any element, creating a flash effect.

Latest version **1.0.1** (published 2018-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install light-it-up
pnpm add light-it-up
yarn add light-it-up
bun add light-it-up
```

## 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.0.1 |
| Published | 2018-08-31 |
| First published | 2018-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Oliver Gugger |
| Maintainers | guggero |

## Links

- npm: https://www.npmjs.com/package/light-it-up
- Repository: https://github.com/guggero/light-it-up
- npm.io page: https://npm.io/package/light-it-up

## Recent versions

- 1.0.1 (latest) — 2018-08-31
- 1.0.0 — 2018-08-18

## README

# light-it-up

Draw SVG lightning bolts on to any element, creating a flash effect.

## Usage

Just add the library and call the `flash` function:

```html
<html style="height: 100%">
<head>
  <script src="https://raw.githubusercontent.com/guggero/light-it-up/master/index.js"></script>
</head>
<body>
<button onclick="flash({duration: 500})">Flash for 0.5s</button>
</body>
</html>
```

Have a look at the [demo](demo.html) too

### Options:

```javascript
{
  element: document.getElementById('foo'), // element to render into, default: document.body
  duration: 1000, // duration of flash effect in milliseconds, default 800
  zIndex: 9999, // CSS property 'z-index' of the inserted <div>, default 1000
  colorFlash: '#ffffff', // color of the flash, default rgba(255, 255, 255, 1)
  colorBlur: '#333333', // color of the blur effect, default rgba(192, 192, 255, 1)
}
```

##  Credits

This code was initially written by [robtex](https://github.com/robtex)
for [moneni.com](https://moneni.com/) and was refactored into an NPM library
with his permission.

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