Utility
AI
Terminal
error-boundary-demo
No opentui live preview is registered for this example yet.
Installation
pnpm dlx shadcn@latest add @termcn/error-boundary
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" |