A library for websites to detect user's connection status. Certified Lit 🔥🔥 Accepting PRs
- A simple JavaScript library to provide a functionality for websites to detect online / offline connection status.
A quick introduction of the minimal setup you need to get a up & running.
$ npm install voltage.js
Here's a brief intro about what a developer must do in order to start developing the project further:
- Download the latest distribution from github release.
- Add
voltage.min.css
andvoltage.min.js
to your html page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Voltage.JS Example</title>
<link rel="stylesheet" href="voltage.min.css" />
</head>
<body>
<div>Turn off your network to experience voltage.</div>
<script src="voltage.min.js"></script>
</body>
</html>
An example implementation using react could be found here.
- Add the latest npm package to the project.
- Import
voltage.css
andvoltage.js
to your frontend.
import 'voltage.js/dist/css/voltage.css';
import 'voltage.js/dist/js/voltage.js';
MIT © Murshid Azher.