@net-watch/vue

Vue 3 composable useNetworkStatus() for real online/offline detection and connection quality (latency, speed). Built on @net-watch/core.
3
Install
npm install @net-watch/vue
Latest Version:0.2.0
Vue:3
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  npm
Maintainer: dmkhoi

@net-watch/vue

Vue 3 composable for real online/offline detection and connection quality.

npm license types

Documentation · Live demo · Source

net-watch live demo: latency and quality update, then the connection goes offline and recovers

Built on @net-watch/core: real online/offline detection and connection quality (latency, speed) as a Vue 3 composable.

Install

pnpm add @net-watch/core @net-watch/vue   # or npm i / yarn add

Usage

<script setup lang="ts">
import { useNetworkStatus } from '@net-watch/vue'

const status = useNetworkStatus()
</script>

<template>
  <span v-if="!status.online">Offline</span>
  <span v-else>{{ status.quality }}<template v-if="status.rtt">, {{ status.rtt }} ms</template></span>
</template>

Good to know

  • The default watcher has no pingUrl, so it detects unplugged cables and Wi-Fi off. Pass your own watcher to also detect "connected but no internet":

    import { createNetworkWatcher } from '@net-watch/core'
    
    export const watcher = createNetworkWatcher({ pingUrl: '/ping' })
    
  • The state has online, quality, rtt, downlink and more. See the state reference.

Learn more

Vue guide · Core package · Source

License

MIT

Related Packages

vue-internet-checker

Check internet availability in your Vue app

6,665 10
vue-network-status

A lightweight, reactive network connectivity and offline monitor banner for Vue...

535 0
v-offline

Offline and Online components for Vue

87,616 380
@syncraft-labs/vue

Vue 3 composables for Syncraft Labs - local-first state synchronization.

5,082 0
nihonpost

🗾 Japanese postal code → address lookup for Vue 3. TypeScript-first, zero-confi...

1,157 4

Version History

Version Released Vue License
0.2.0 >=3.3 MIT
0.1.1 >=3.3 MIT
0.1.0 >=3.3 MIT
Pre-releases (5)
Version Released Vue License
0.2.0-beta-20261019101243 >=3.3 MIT
0.1.1-beta-20261019045643 >=3.3 MIT
0.1.1-beta-20261019045139 >=3.3 MIT
0.1.0-beta.0 >=3.3 MIT
0.0.0-stage