Offline State

Display modals, alerts, or any HTML when your users are offline.

CBWIRE provides offline state management, making it easy to toggle UI elements when the user is offline or online.

You can use wire:offline to display elements when CBWIRE detects that the user is offline.

<div wire:offline><!-- Oh no, you're offline --></div>

You can append .class to your wire:offline directive and specify a CSS class to toggle when the user is offline.

<div wire:offline.class="online" class="online"></div>

Use .remove to specify classes you want to be removed when offline.

<div wire:offline.class.remove="im-online" class="im-online"></div>

Last updated