Press "Enter" to skip to content

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 v-offline@2
  • For Vue 3.x version – npm i v-offline@3

🔛 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.

Be First to Comment

    Leave a Reply

    Your email address will not be published.