Feedback
ErrorState
Explains why primary content is unavailable and provides an application-owned recovery path.
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.
Could not load projects
Check your connection and try again. Your existing projects are unchanged.
Reference: REQ-4F82
Framework usage
Switch targets to compare the adapter code. The preview stays visually stable because all three packages share the same tokens andui-* class contract.---
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>import { Button, ButtonLink, ErrorState } from '@santi020k/lumen-react'
export const Example = () => (
<ErrorState
actions={(
<>
<Button size="sm">Try again</Button>
<ButtonLink href="/docs" variant="secondary">Open help</ButtonLink>
</>
)}
description="Check your connection and try again. Your existing projects are unchanged."
id="projects-error"
reference="REQ-4F82"
title="Could not load projects"
/>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<lumen-error-state id="projects-error" aria-labelledby="projects-error-title">
<lumen-illustration
aria-hidden="true"
data-slot="error-state-graphic"
variant="error"
></lumen-illustration>
<div data-slot="error-state-content">
<h2 data-slot="error-state-title" id="projects-error-title">Could not load projects</h2>
<p data-slot="error-state-description">
Check your connection and try again. Your existing projects are unchanged.
</p>
<p data-slot="error-state-reference">Reference: <code>REQ-4F82</code></p>
</div>
<div data-slot="error-state-actions">
<lumen-button size="sm">Try again</lumen-button>
<a class="ui-button ui-button--secondary ui-button--sm" href="/docs">Open help</a>
</div>
</lumen-error-state>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.
pnpm add @santi020k/lumen-astropnpm add @santi020k/lumen-astrolumen add ErrorStatelumen add ErrorStatepnpm add @santi020k/lumen-reactpnpm add @santi020k/lumen-reactlumen add ErrorState --target reactlumen add ErrorState --target reactpnpm add @santi020k/lumen-elementspnpm add @santi020k/lumen-elementslumen add ErrorState --target elementslumen add ErrorState --target elementsAPI 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.
| Attribute | Values | Default | Description |
|---|---|---|---|
| title | string | required | Names the content failure in user-safe language. |
| description | string | - | 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 slot | rendered 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, referenceLabel | string | - | Shows a safe support reference without exposing raw exception details. |
| headingLevel | 1 | 2 | 3 | 4 | 5 | 6 | 2 | Fits the visible title into the surrounding document hierarchy. |
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
| ...native attributes | HTML attributes | - | Forwards standard attributes to the root element unless the component consumes them. |