1Sponsor

Error Boundary

React error boundary with graceful terminal display

Terminal

Installation

pnpm dlx shadcn@latest add https://termcn.dev/r/error-boundary.json

Usage

import { ErrorBoundary } from "@/components/ui/error-boundary";
<ErrorBoundary title="Application Error">
  <YourAppContent />
</ErrorBoundary>

API Reference

ErrorBoundary

PropTypeDefault
childrenReactNoderequired
fallbackReactNodeundefined
onError(error: Error, info: { componentStack: string }) => voidundefined
titlestring"Error"