Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FeedbackAndroid

Error state

Explain an unavailable region or page and offer application-owned recovery.

Public APILumenErrorStateAndroid / Compose

Native example

Use Error state

Use when a region or page cannot show its primary content. Keep retry and request policy in application state; use Banner when existing content remains useful.

Error state rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenErrorState(
    title = "Could not load projects",
    description = "Check your connection and try again.",
    kind = LumenErrorStateKind.Offline,
    reference = "REQ-4F82",
    actions = { LumenButton(onClick = ::retry) { Text("Try again") } }
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenErrorState.

APIValues or typeDefaultDescription
titleStringRequiredNames the unavailable content or failed operation.
kindLumenErrorStateKinderrorSelects error or offline context and its default illustration.
layoutLumenErrorStateLayoutdefaultAdapts spacing and whether the state fills its available page height.
referenceString?nullShows a safe support reference without exposing technical details.
actions(@Composable () -> Unit)?nullProvides application-owned recovery actions.

Native behavior

Design and accessibility

When to use it

Use when a region or page cannot show its primary content. Keep retry and request policy in application state; use Banner when existing content remains useful.

Accessibility

The title is a heading, recovery actions retain native focus order, and React Native and Compose expose configurable live-region behavior.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module