/
1.1k
Sponsor

Error Boundary

React error boundary with graceful terminal display

Terminal

Installation

$ pnpm dlx shadcn@latest add @termcn/ink/error-boundary

Usage

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

API Reference

ErrorBoundary

PropTypeDefault
childrenReactNoderequired
fallbackReactNode-
onError(error: Error, info: { componentStack: string }) => void-
titlestring"Error"

Notes

Accessibility

termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.

  • Screen reader: Ink labels and semantic state expose the component without relying on visual styling alone.