MindeesUI
ComponentsStates

ErrorState

A centered error screen with a danger-toned title and a built-in retry button via onRetry.

ErrorState is a centered layout for failures. Its title defaults to Something went wrong in the danger tone. Passing onRetry renders a danger-toned retry button automatically; supply your own action to override it entirely.

Import

import { ErrorState } from '@mindees/ui';

Usage

<ErrorState description="We couldn't load your data." onRetry={refetch} retryLabel="Try again" />

Props

PropTypeDefaultDescription
titlestring'Something went wrong'Heading copy.
descriptionstringSupporting copy shown under the title.
onRetry() => voidRenders a default retry button when action is omitted.
retryLabelstring'Try again'Label for the default retry button.
iconReactNodeIcon or illustration rendered above the title.
actionReactNodeCustom action, overriding the onRetry button.
styleStyleProp<ViewStyle>Style applied to the container.

Inherits the remaining ViewProps (except style).

Accessibility

The container uses accessibilityRole="summary" so the message reads as one status. The default retry button is a standard Button with its own accessibility; provide a clear description of what failed.

On this page