Themes
- Default
- Catppuccin
- Dracula
- High Contrast
- High Contrast Light
- Monokai
- Nord
- One Dark
- Solarized
- Tokyo Night
- AMOLED
- Aura
- Ayu
- Carbonfox
- Catppuccin Frappe
- Catppuccin Macchiato
- Cobalt2
- Cursor
- Everforest
- Flexoki
- GitHub
- Gruvbox
- Kanagawa
- Lucent Orng
- Material
- Matrix
- Mercury
- Night Owl
- OC-2
- One Dark Pro
- OpenCode
- Orng
- Osaka Jade
- Palenight
- Rose Pine
- Shades of Purple
- Synthwave '84
- Vercel
- Vesper
- Zenburn
Utility
AI
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/error-retry
Usage
import { ErrorRetry } from "@/components/ui/error-retry";<ErrorRetry
error={new Error("Network error")}
retryCount={0}
maxRetries={3}
onRetry={() => refetch()}
onDismiss={() => setError(null)}
isActive
/>Shortcuts
When retryCount < maxRetries and isActive is true:
- Enter or r — calls
onRetry - Esc — calls
onDismiss
After retryCount >= maxRetries, only Esc dismisses; retry shortcuts are disabled.
API Reference
ErrorRetry
| Prop | Type | Default |
|---|---|---|
error | Error | string | required |
onRetry | () => void | - |
onDismiss | () => void | - |
retryCount | number | 0 |
maxRetries | number | 3 |
isActive | boolean | true |