⚙️
View DocsNetwork
SystemMonitor 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
| Property | Type | Description |
|---|---|---|
| status | NetworkStatus | null | Full network status object |
| isConnected | boolean | null | Whether device is connected to network |
| connectionType | ConnectionType | null | Connection type ('wifi', 'cellular', 'none', etc.) |
| isLoading | boolean | Whether status is being fetched |
| error | Error | null | Current error if any |
| refresh | () => Promise<NetworkStatus> | Manually refresh network status |