# useOnlineStatus

*Category:* Utilities
*Section:* Browser & device hooks
*Source:* https://uikit.developers.rio.cloud/#/utilities/useOnlineStatus
*Captured:* 2026-04-27T14:59:41.667Z

The useOnlineStatus hook tells you when there is a network connection or not.

## useOnlineStatus

### Example: Example 1

You are online

#### React (tsx)

```tsx
import useOnlineStatus from '@rio-cloud/rio-uikit/useOnlineStatus';

export default () => {
    const isOnline = useOnlineStatus();

    return (
        <div className='display-flex justify-content-center align-items-center'>
            <div className='display-flex flex-column align-items-center text-size-14'>
                <span className={`rioglyph rioglyph-wifi text-size-200pct ${isOnline ? '' : 'text-color-light'}`} />
                <div>{`You are ${isOnline ? 'online' : 'offline'}`}</div>
            </div>
        </div>
    );
};
```

#### HTML (html)

```html
<div class="display-flex justify-content-center align-items-center">
    <div class="display-flex flex-column align-items-center text-size-14">
        <span class="rioglyph rioglyph-wifi text-size-200pct ">
        </span>
        <div>You are online</div>
    </div>
</div>
```