Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Web docs
Feedback

ErrorState

Explains why primary content is unavailable and provides an application-owned recovery path.

FrameworksAstro · React · Elements

Registry commandlumen add ErrorState

InteractionNative markup

01

See it and copy it

Framework example

Choose Astro, React, or Elements to compare native usage against the shared visual output. Each example assumes the framework-level setup is already complete.

AstroSame visual contract, native framework API

Could not load projects

Check your connection and try again. Your existing projects are unchanged.

Reference: REQ-4F82

Open help

Framework usage

Switch targets to compare the adapter code. The preview stays visually stable because all three packages share the same tokens and ui-* class contract.
astro
---
import {
  Button,
  ButtonLink,
  ErrorState
} from '@santi020k/lumen-astro'
---

<ErrorState
  description="Check your connection and try again. Your existing projects are unchanged."
  id="projects-error"
  reference="REQ-4F82"
  title="Could not load projects"
>
  <Button slot="actions" size="sm">Try again</Button>
  <ButtonLink slot="actions" href="/docs" variant="secondary">
    Open help
  </ButtonLink>
</ErrorState>
Edit ErrorState in browser
02

Choose your target

Add this component

Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.

bash@santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
bashAstro wrapper
lumen add ErrorState
lumen add ErrorState

API reference

Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.

AttributeValuesDefaultDescription
titlestringrequiredNames the content failure in user-safe language.
descriptionstring-Explains the problem and the safest next step.
kind"error" | "offline""error"Selects the known failure context and matching semantic illustration.
layout"compact" | "default" | "page""default"Adapts the surface to a bounded region, ordinary section, or page-level fallback.
actions / actions slotrendered actions-Provides application-owned recovery or navigation actions.
announce"assertive" | "off" | "polite""off"Opts a dynamically inserted failure into the appropriate live-region behavior.
reference, referenceLabelstring-Shows a safe support reference without exposing raw exception details.
headingLevel1 | 2 | 3 | 4 | 5 | 62Fits the visible title into the surrounding document hierarchy.
class, classNamestring""Merges custom classes with the generated ui-* root classes.
...native attributesHTML attributes-Forwards standard attributes to the root element unless the component consumes them.

Web docsFull catalog