heyoffline

Warn your users when their network goes down. Make sure they don't lose anything.

Downloads
7
Stars
1.1K
Committers
4

🔌 Heyoffline

Notify your users when their network goes down. Make sure they don't lose anything.

Features

  • Notify on general network outage
  • Notify only when users have unsaved form field states
  • Default, pretty generic, good looking styles

Setup

Module

NPM: heyoffline

import Heyoffline from "./dist/heyoffline.esm.js"
new Heyoffline()

Browser

UNPKG: https://unpkg.com/heyoffline@latest/dist/heyoffline.umd.js

<script src="dist/heyoffline.umd.js"></script>
new Heyoffline({
  monitorFields: true,
  fields: ".monitoredFields"
});

Options

Events

Requirements

Heyoffline is framework-agnostic vanilla JS.

Source code

All efforts have been made to keep the source as clean and readable as possible.

Requirements

Heyoffline.js is released under an MIT License, so do with it what you will.

Package Rankings
Top 12.55% on Npmjs.org
Related Projects