A Simple VueJS Component To Detect Offline & Online Changes

V-Offline is a simple VueJS component for detecting offline changes. Built from scratch, uses Vue 2 & Composition API with TypeScript.

vue detect offline, javascript detect offline, vue offline, check if user is offline, v offline, vue pwa offline, detect slow internet connection react

Features

  • Detect offline & online events for your Vue app.
  • Built from scratch using Vue 2 & Composition API with TypeScript.
  • For Vue 2.x version – npm i [email protected]
  • For Vue 3.x version – npm i [email protected]

🔛 Angular 5+ Detect Online/Offline State Javascript

How to make use of it:

Installation

npm install --save v-offline
npm install --save-dev @vue/composition-api

Usage

Vue.component('VOffline', require('v-offline'));
import Vue from 'vue';
import VOffline from 'v-offline';

Vue.use(VOffline);
import { VOffline } from 'v-offline';

API

Props

NameTypeRequired?DefaultDescription
online-classStringNoStyling the div which you want to give if you’re online.
offline-classStringNoStyling the div which you want to give if you’re offline.
ping-urlStringNohttps://google.comPinging any URL to double-check if you’re online or not.

Events

NameReturnsDescription
@detected-conditionStringEmits a boolean value

Detect Offline & Online, V-Offline Plugin/Github


See Demo And Download

Official Website(vinayakkulkarni): Click Here

This superior jQuery/javascript plugin is developed by vinayakkulkarni. For extra advanced usage, please go to the official website.

Related Posts

Input-Values-Using-Mouse-Drag

Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…

simple-parallax-scrolling-js

Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…

Convert-Form-Data-to-JSON

How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…

editable-html-table-using-javascript

A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

jquery.youtube-background

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background

jquery.youtube-background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…