Skip to main content
⚙️

Network

System
View Docs

Monitor network connectivity status in real-time

connectivitywificellularonlineoffline

Demo

🔄

Checking...

Connection Types

📶
WiFi
Inactive
📱
Cellular
Inactive
📵
Offline
Active

Note: Network status is monitored in real-time and updates automatically when connectivity changes. On native platforms, this uses Capacitor's Network plugin. On web, it uses the Navigator.onLine API and online/offline events.

Usage

import { useNetwork } from '@classic-homes/native/svelte';
// or for React:
import { useNetwork } from '@classic-homes/native/react';

API Reference

PropertyTypeDescription
statusNetworkStatus | nullFull network status object
isConnectedboolean | nullWhether device is connected to network
connectionTypeConnectionType | nullConnection type ('wifi', 'cellular', 'none', etc.)
isLoadingbooleanWhether status is being fetched
errorError | nullCurrent error if any
refresh() => Promise<NetworkStatus>Manually refresh network status

Related Features