Offline State

An offline status card with a warning dot, a You are offline heading, a note on what still works and a Retry connection button. For PWA and sync apps.

src/registry/ui/offline-state.tsx/r/offline-state.json

Installation#

bash
npx shadcn@latest add @minidev/offline-state

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/offline-state.json

Usage#

tsx
import { OfflineState } from "@/components/ui/offline-state"

export function Example() {
  return <OfflineState />
}

API reference#

OfflineState props
PropTypeDefault
classNamestring-

Dependencies#

npm

React only

Built from

All alerts, toasts and empty states

Learn more