Error State
Shown in place of content that failed to load, with a retry button.Retry
Preview
Code
Couldn’t load invoices
Check your connection and try again.Installation
Package
CLI (copy source)
pnpm
pnpm add @advui/corenpm
npm install @advui/coreUsage
import { ErrorState } from '@advui/core'
<ErrorState
description="Check your connection and try again."
onRetry={refetch}
retrying={isFetching}
/>API reference
ErrorState
Empty State with an error icon; also accepts its props.| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | 'Something went wrong' | Short heading. |
description | ReactNode | — | What failed and what to do. |
onRetry | () => void | — | Shows a retry button that calls this. |
retryLabel | string | 'Try again' | Retry button text. |
retrying | boolean | false | Spinner on the retry button. |
children | ReactNode | — | More actions after Retry. |
Accessibility
- On web it has the
alertrole, so screen readers announce it when it replaces content. - The title is a heading, and the retry button shows a spinner and
aria-busywhile retrying.
Platform notes
iOS
Not announced automatically; move focus to it or announce with
AccessibilityInfo.Android
Not announced automatically; move focus to it or announce with
AccessibilityInfo.