Core Dynamic ComponentsGrid Presentation

DynamicCard

DynamicCard fetches card datasets from a remote endpoint and renders them in responsive CSS grid arrangements. Each card displays key/value data items with automated loading skeletons and pagination controls.

Automated API fetching with CardSkeleton loading state
Responsive grid configuration via gridClassName
Synchronized with useGridFilters for search and filtering
Configurable pageSize with server-side pagination controls

Props & Configuration

6 props

Complete property specifications, parameter types, and default fallbacks.

PropertyTypeDefaultDescription
apiDataRequiredApiDataType—Remote endpoint configuration containing apiUrl and apiType.
filterKeyRequiredstring—Unique filter key for grid filter synchronization.
refreshTriggernumber0Increment to trigger immediate data re-fetch.
pageSizenumber12Number of cards displayed per page.
classNamestring—Wrapper container class name.
gridClassNamestring"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"CSS Grid class name controlling column responsive breakpoints.

Interactive Examples & Live Previews

2 Demos

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

Example 1

Basic Product Card Grid

Remote cards layout fetching item specifications from an API.

Live Interactive Demo
Infinite Scroll Card Grid
3 sample entities

Project Alpha (Mobile Client)

ACTIVE
Lead:Alexander Wright
Progress:85% Complete
Budget:$45,000 USD
Deadline:Dec 31, 2026
Click to view details →

Authentication Service v2

PENDING
Lead:Sophia Martinez
Progress:40% Complete
Budget:$18,500 USD
Deadline:Jan 15, 2027
Click to view details →

Cloud Infrastructure Migration

ACTIVE
Lead:Marcus Chen
Progress:92% Complete
Budget:$72,000 USD
Deadline:Nov 30, 2026
Click to view details →
DynamicCard.basic.tsxtsx
1import React from "react";
2import { DynamicCard } from "antd-dynamic-ui";
3
4export default function BasicCards() {
5 return (
6 <div className="p-6">
7 <h2 className="text-xl font-bold mb-4">Inventory Products</h2>
8 <DynamicCard
9 apiData={{ apiUrl: "/api/v1/inventory", apiType: "get" }}
10 filterKey="inventory_cards"
11 pageSize={6}
12 />
13 </div>
14 );
15}
Example 2

Custom Responsive Grid Breakpoints

Card grid with 4-column layout on wide screens and refresh counter.

Live Interactive Demo
Interactive Action Cards
3 entities

Project Alpha (Mobile Client)

ACTIVE
Lead:Alexander Wright
Progress:85% Complete
Budget:$45,000 USD
Deadline:Dec 31, 2026

Authentication Service v2

PENDING
Lead:Sophia Martinez
Progress:40% Complete
Budget:$18,500 USD
Deadline:Jan 15, 2027

Cloud Infrastructure Migration

ACTIVE
Lead:Marcus Chen
Progress:92% Complete
Budget:$72,000 USD
Deadline:Nov 30, 2026
DynamicCard.complete.tsxtsx
1import React, { useState } from "react";
2import { DynamicCard, DynamicHeader } from "antd-dynamic-ui";
3
4export default function CompleteCardGrid() {
5 const [refresh, setRefresh] = useState(0);
6
7 return (
8 <div className="space-y-4 p-6">
9 <DynamicHeader
10 filterKey="device_fleet_cards"
11 title="IoT Device Fleet"
12 onRefresh={() => setRefresh((c) => c + 1)}
13 />
14 <DynamicCard
15 apiData={{ apiUrl: "/api/v1/devices", apiType: "get" }}
16 filterKey="device_fleet_cards"
17 gridClassName="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6"
18 pageSize={12}
19 refreshTrigger={refresh}
20 />
21 </div>
22 );
23}

Expected Backend API Response Schema

Ensure your backend endpoint returns JSON matching this exact structure to prevent hydration and rendering errors.

Expected API Response Payload

Your backend API must return JSON matching this exact structure.

{
  "success": true,
  "message": "Fetched cards",
  "data": {
    "rows": [
      {
        "title": "Server Node US-East-1",
        "info": [
          {
            "key": "CPU Load",
            "value": "42%"
          },
          {
            "key": "Memory",
            "value": "16 GB / 32 GB"
          },
          {
            "key": "Status",
            "value": "Healthy"
          }
        ]
      }
    ],
    "totalRows": 1
  }
}

Frequently Asked Questions & Quick Solutions

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

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

DynamicCard 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 DynamicCard?▼

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.