amankaushik481

Error State

Component

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>
  );
}

More by amankaushik481

View all
  • Chip Filter

    Chip Filter

    7
  • Icon Button

    Icon Button

    5
  • Background Boxes

    Background Boxes

    4
  • Emoji Picker

    Emoji Picker

    4
  • Morphing Text

    Morphing Text

    2
  • Typing Text

    Typing Text

    1
  • Treemap Chart

    Treemap Chart

    1
  • Particles

    Particles

    1