UI Feedback

ErrorApi

ErrorApi provides an attractive fallback state when HTTP queries fail, with custom error messages and retry buttons.

Friendly error illustration
Retry button with onRetry callback
fullScreen option for 500 error pages

Props & Configuration

4 props

Complete property specifications, parameter types, and default fallbacks.

PropertyTypeDefaultDescription
titlestring"Oops Something went wrong."Error headline text.
messagestring—Detailed explanation or error reason.
onRetry() => void—Retry callback executed when user clicks the retry button.
fullScreenbooleanfalseExpands container to fill 60vh+ viewport height.

Interactive Examples & Live Previews

1 Demos

Every example includes its own live, interactive preview element alongside the corresponding copyable TypeScript snippet.

Example 1

Network Error Card with Retry

Error banner shown inside cards when a query fails.

Live Interactive Demo
Confused Dog

Service Cluster Unavailable

Failed to connect to backend cluster at port 8080. Connection timed out after 5000ms.

React Hook Form Live State:{"testInput":"Sample text","testPassword":"secretPassword123","testSelect":"editor","testNumber":42,"testTextArea":"This is a multi-line text area content for enterprise use.","testSwitch":true,"testCheckbox":true,"testRadio":"b","testSlider":65,"testRating":4,"testColor":"#e05d44","testCountry":"US","testPhone":"+1 (555) 019-2834","testOtp":"123456"}
ErrorApi.basic.tsxtsx
1import React from "react";
2import { ErrorApi } from "antd-dynamic-ui";
3
4export default function NetworkError() {
5 return (
6 <ErrorApi
7 title="Failed to Load Financial Summary"
8 message="The accounting microservice is undergoing routine database maintenance. Please retry in a few moments."
9 onRetry={() => alert("Retrying request...")}
10 />
11 );
12}

Frequently Asked Questions & Quick Solutions

Architectural patterns, React 19 compatibility, and integration tips for ErrorApi.

How does ErrorApi integrate with Ant Design 5.x and Next.js 15?▼

ErrorApi is designed as an enhanced, declarative wrapper for Ant Design. It fully supports Next.js 15 App Router when using @ant-design/nextjs-registry, eliminating SSR hydration mismatches and guaranteeing 0ms layout thrashing.

Can I customize validation, themes, and props for ErrorApi?▼

Yes. Every prop is fully typed in TypeScript 5 with comprehensive Intellisense. You can pass custom styling via className or style props, configure global Ant Design themes via ConfigProvider, and extend validation logic seamlessly.