English | 简体中文
Offline detect plugin for Dash applications using Dash Hooks.
pip install dash-offline-detect-pluginfrom dash import Dash
# Import the offline detect plugin
from dash_offline_detect_plugin import setup_offline_detect_plugin
# Enable the offline detect plugin for the current app
setup_offline_detect_plugin()
app = Dash(__name__)
# Rest of your app code...Run the included example:
python example.pyThis function enables the offline detection feature for your Dash application.
| Parameter | Type | Default | Description |
|---|---|---|---|
interval |
int |
5000 |
Interval of detection in browser (milliseconds). Controls how frequently the browser checks if the backend service is available. |
title |
str |
"Service Unavailable" |
Title of the overlay displayed when the service is unavailable. |
description |
str |
"Unable to connect to the backend service, trying to reconnect..." |
Description text displayed in the overlay when the service is unavailable. |
