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
Name | Type | Required? | Default | Description |
---|---|---|---|---|
online-class | String | No | ” | Styling the div which you want to give if you’re online. |
offline-class | String | No | ” | Styling the div which you want to give if you’re offline. |
ping-url | String | No | https://google.com | Pinging any URL to double-check if you’re online or not. |
Events
Name | Returns | Description |
---|---|---|
@detected-condition | String | Emits 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.