Component packs › Detour › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
check | () => Promise<boolean> | boolean | navigator.onLine | Your own connectivity check. Default: navigator.onLine. |
online | boolean | Start as online (shows the recovered state). | |
width | number | 420 | Width in px. Default 420. |
dark | boolean | ||
onOnline | () => void | ||
autoplay | number | false | Showcase mode: goes offline and back every N ms while visible. |
readonly online: booleandestroy(): voidimport Offline from './Offline';
<Offline />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: 404 and empty states.