Utility
AI
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
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
fallback | ReactNode | undefined |
onError | (error: Error, info: { componentStack: string }) => void | undefined |
title | string | "Error" |