js-screensaver
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

JS Screensaver

Simple library to run screensaver on your website.

Run screensaver without any configuration:

JsScreensaver.start({});

This will run the predefined screensaver with basic message and styling. It's possible to extend the basic screensaver with the following options which have to be put in the object.

  • text - insert your message inside the default screensaver,
  • background - change the background color the default screensaver,
  • baseElement - by default, screensaver is embeded into body but you can choose any DOM element from your page to insert the screensaver there.
  • animationSpeed - choose the animation speed. There are 3 options - slow, regular, fast. Default value is set to regular.
  • customElement - replace the default screensaver element with your custom element. You can put Node Element or raw HTML in string.
  • triggerTime - the time in miliseconds after which screensaver will be launched.

/js-screensaver/

    Package Sidebar

    Install

    npm i js-screensaver

    Weekly Downloads

    2

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    10.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • icelandico