Component packs › Detour › Offline Page

Offline Page

Cars drive into a tunnel and none come back out until Try again finds a connection.

Offline Page is an error page from Detour, a component pack with 6 error and empty pages: Error and empty pages, each a small live street seen from above with one honest way forward. Price: $2 for the whole pack.

Built with: real connectivity check, online and offline events, traffic that resumes.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Offline Page props

PropTypeDefaultDescription
check() => Promise<boolean> | booleannavigator.onLineYour own connectivity check. Default: navigator.onLine.
onlinebooleanStart as online (shows the recovered state).
widthnumber420Width in px. Default 420.
darkboolean
onOnline() => void
autoplaynumber | falseShowcase mode: goes offline and back every N ms while visible.

Methods on the ref

Use it in React

import Offline from './Offline';

<Offline />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Detour

Good for: 404 and empty states.