suiss/ui · Block
Empty Offline
An offline empty state with a retry action that reconnects and reveals a grid of albums.
Empty Offline is an open-source block from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
An offline state for a content app, with a Wi-Fi icon, an explanation and Try Again and Downloads buttons. Try Again shows a spinner while reconnecting, then reveals an album grid. Use it as the no-connection screen for media, feeds or any app that can fall back to cached content.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Copy the source into
components/blocks/empty-offline.tsx:
- Update the import paths to match your project.
Usage
Replace albums with your content. The demo fakes reconnecting with a timer; drive the offline, loading and online states from your network status or a refetch instead, and remove the Disconnect link from the online view. Give the Downloads button a handler.
Notes
Album artwork is an Unsplash placeholder.

Composes Screen, Empty, Button, Spinner, Icon and Text. Try Again shows a loading state for a moment and then switches to the online content, which has a Disconnect link back to the offline state.
Installation
The CLI also adds what it builds on: Button, Empty, Icon, Screen, Spinner, Text. On React Native it also adds the animated view components/ui/animated-view.tsx.
Manual
- Install the dependencies:
-
Add the pieces it builds on: Button, Empty, Icon, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/empty-offline.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Button, Empty, Icon, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/empty-offline.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Button, Empty, Icon, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/empty-offline.tsx:
- Update the import paths to match your project.
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Replace ALBUMS with your content and the timed retry with a real connectivity check. The component takes no props.
