# react-page-blur

> Blur the page to draw focus, presumedly for showing inactive/loading state or a popup

Latest version **1.0.2** (published 2018-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-page-blur
pnpm add react-page-blur
yarn add react-page-blur
bun add react-page-blur
```

## 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.2 |
| Published | 2018-02-21 |
| First published | 2018-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joseph Livengood |
| Maintainers | livengood |

## Links

- npm: https://www.npmjs.com/package/react-page-blur
- npm.io page: https://npm.io/package/react-page-blur

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^15.5.4
- [webpack](https://npm.io/package/webpack.md) ^2.6.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0

## Recent versions

- 1.0.2 (latest) — 2018-02-21
- 0.0.1 — 2018-02-21

## README

#react-page-blur

Full page blur... every time, every browser, every circumstance.


###Install

```
npm install react-page-blur --save
```

###Usage
Simple:
```
<PageBlur active/>
```
Intermediate:
```
<PageBlur
  color='blue'
  opacity='0.8'
  onActive={this.pauseVideo}
  active
>
    <PaywallPopup />
</PageBlur>
```
Advanced:
```
<PageBlur
  image='/public/img/dark-watermark.gif'
  imageRepeat='no-repeat'
  imagePosition='center left'
  onOffClick={this.playSound}
  pulse
  active
/>
```

###Props
| Property | Type | Content  | Default Value |
| --- | --- | --- | --- |
| active | `boolean` | Is the page blurred | `false`
| color | `string` | Color of blur (color/hex/rgb) | `'black'`
| opacity | `number` | Opacity of blur (0-1) | `0.5`
| pulse | `boolean` | Pulsing effect of blur | `false`
| image | `string` | background-image of blur | `undefined`
| imageRepeat | `string`* | background-repeat of blur | `repeat`
| imagePosition | `string`^ | background-position | `center`
| className | `string` | Any additional classes to add | `''`
| onOffClick | `function` | Called if user clicks the blur but not a child | `() => {}`
| onActive | `function` | Called once when activated | `() => {}`
| offActive | `function` | Called once when unactivated from active | `() => {}`

*Acceptable string inputs are `'repeat', 'repeat-x', 'repeat-y', 'no-repeat'`

^Acceptable string inputs are explained on: https://developer.mozilla.org/en-US/docs/Web/CSS/background-position

###Development
```
npm install
npm run build
npm link
npm start
```

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