Components · Data Display
Error State
StableAdded v0.0.1
Full-page or section error view with retry action.
import { ErrorState } from '@nexub/react';Playground
Props
tone
Something went wrong
We could not load the data. Please try again.
<ErrorState onRetry={() => {}} description="We could not load the data. Please try again." title="Something went wrong" />Examples
Default
Warning
States
Something went wrong
We could not load the data. Please try again.
defaultSomething went wrong
We could not load the data. Please try again.
tone="error"Something went wrong
We could not load the data. Please try again.
tone="info"Something went wrong
We could not load the data. Please try again.
tone="warning"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| titlerequired | string | — | Primary error heading shown to the user. |
| description | string | — | Supporting text with more detail about the error or recovery steps. |
| tone | 'error' | 'info' | 'warning' | 'error' | Controls the icon and colour scheme of the error state. |
| onRetry | (() => void) | — | When provided, renders a "Try again" button that calls this function on click. |
| retryLabel | React.ReactNode | 'Try again' | Text of the retry button. |
On iOS & Android: ErrorState
@nexub/react-nativeAlpha
import { ErrorState } from '@nexub/react-native';
<ErrorState onRetry={refetch} />Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
ErrorState props
| Prop | Type | Default | Description |
|---|---|---|---|
| onRetry | () => void | — | Shows a Retry button (messages.retry). |
| titlerequired | string | — | — |
| description | string | — | — |
| icon | React.ComponentType<NativeIconProps> | AlertTriangle | — |
| size | 'sm' | 'md' | 'lg' | 'md' | Scales spacing, icon and title. |
| illustration | React.ReactNode | — | 12.3: art in place of the icon disc, e.g. <Illustration kind="noData" />. |