# spotlight-canvas

> a simple canvas-based spotlight that can be used to highlight elements

Latest version **1.2.0** (published 2018-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install spotlight-canvas
pnpm add spotlight-canvas
yarn add spotlight-canvas
bun add spotlight-canvas
```

## 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.0 |
| Published | 2018-09-28 |
| First published | 2018-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 59.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | David Figatner |
| Maintainers | davidfig |
| Keywords | spotlight, DOM, canvas, circle, polygon, UI |

## Links

- npm: https://www.npmjs.com/package/spotlight-canvas
- Repository: https://github.com/davidfig/spotlight
- Homepage: https://github.com/davidfig/spotlight#readme
- Issues: https://github.com/davidfig/spotlight/issues
- npm.io page: https://npm.io/package/spotlight-canvas

## Dependencies (1)

- [penner](https://npm.io/package/penner.md) ^0.1.3

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2018-09-28
- 1.1.1 — 2018-09-05
- 1.1.0 — 2018-09-05
- 1.0.1 — 2018-09-05
- 1.0.0 — 2018-09-05
- 0.1.0 — 2018-07-29

## README

# spotlight-canvas
a simple canvas-based spotlight that can be used to highlight elements

Features:
* a canvas that darkens the screen
* spotlight areas based on circles or polygons
* spotlight areas can be dynamically changed or cleared
* the canvas includes fadeIn and fadeOut functions

## Live Example
[davidfig.github.io/spotlight/](https://davidfig.github.io/spotlight/)

## Rationale
I needed a way to highlight elements in my UI. 

## Simple Example
```js
var Spotlight = require('spotlight-canvas');

// create the scrollbox
var spotlight = new Spotlight();

// create a circle spotlight
spotlight.circle(100, 100, 200);

```

## Installation

```
npm i spotlight-canvas
```

## API Documentation
[https://davidfig.github.io/spotlight/jsdoc/](https://davidfig.github.io/spotlight/jsdoc/)

## license  
MIT License  
(c) 2018 [YOPEY YOPEY LLC](https://yopeyopey.com/) by [David Figatner](https://twitter.com/yopey_yopey/)

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