1.0.11 • Published 5 years ago

react-screen-burn v1.0.11

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

react-screen-burn

React component to help prevent screen burn in (for example on wall panels)

NPM Travis CI

Install

npm install --save react-screen-burn

Usage

import * as React from 'react';

import { ScreenBurnLine } from 'react-screen-burn';

class Example extends React.Component {
  render() {
    return (
      <React.Fragment>
        <h1>React Screen Burn</h1>
        <p>
          React component to help prevent screen burn in (for example on wall
          panels)
        </p>
        <ScreenBurnLine
          colors={['#ff0000', '#00ff00', '#0000ff']}
          retriggerTime={1000}
          size={1}
          triggerTime={2000}
        />
      </React.Fragment>
    );
  }
}

Props

PropTypeDefaultDescription
colorsstring[]['#ff0000', '#00ff00', '#0000ff']Array of CSS colors
retriggerTimenumber3600000 (1 hour)Milliseconds until line restarts after reaching end of viewport
sizenumber1Pixel height of line. This will scale on high DPI displays, e.g. value of 1 on a 3 device pixel ratio screen will render as 1/3 of a display pixel (1 physical pixel)
triggerTimenumber3600000 (1 hour)Milliseconds after render until line first starts

License

MIT © Sipcentric Ltd.

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago