Retry Block

Error block that pairs a danger inline alert with a Try again button and an onRetry callback. Defaults to a request failed message you can override in React.

src/registry/ui/retry-block.tsx/r/retry-block.json

Installation#

bash
npx shadcn@latest add @minidev/retry-block

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/retry-block.json

Usage#

tsx
import { RetryBlock } from "@/components/ui/retry-block"

export function Example() {
  return <RetryBlock />
}

API reference#

RetryBlock props
PropTypeDefault
titlestring"Request failed"
descriptionstring"Check your connection and try again."
onRetry() => void-
classNamestring-

Dependencies#

npm

React only
All alerts, toasts and empty states

Learn more