About
A centered error panel with a role="alert" region, title, explanation and an optional retry button, used when a fetch or data load fails.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Error State to your project and fits it to your theme.
Code
How Error State is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ErrorState } from "@/components/ui/error-state";
export default function ErrorStateDemo() {
return (
<div className="flex w-full items-center justify-center p-10">
<ErrorState
className="w-full max-w-md"
title="Couldn't load reports"
description="The reports service did not answer. Nothing was lost."
onRetry={() => {}}
/>
</div>
);
}







