Introduction to antd-dynamic-ui
antd-dynamic-ui is a next-generation, declarative UI framework designed for Ant Design 5.x and React 18/19. It eliminates boilerplate by allowing teams to drive tables, forms, modals, and layouts directly from clean, type-safe JSON schemas.
Why Schema-Driven UI?
In typical React enterprise apps, engineers write thousands of lines of repetitive JSX: configuring Ant Design table columns with custom render functions, wiring up form items with validation rules, managing pagination state, handling filter drawers, and writing ad-hoc responsive logic.
antd-dynamic-ui flips this paradigm: your backend or state management defines the schema (columns, fields, validation types, options), and the framework compiles it into optimized, accessible Ant Design components.
| Capability | Traditional Ant Design | antd-dynamic-ui |
|---|---|---|
| Table Columns | Manual JSX renderers, explicit sorters and width logic | Declarative JSON composite cell types ("STATUS", "IMAGE", "LINK") |
| Form Validation | Manual Ant Design rules or custom async validators | Automatic Zod compilation via generateZodSchema |
| Virtual Scrolling | Requires complex virtual-list plugin integration | Built-in adaptive 60fps virtualization (>50 rows) with rAF throttling |
| Column Reordering & Export | Requires third-party dnd-kit and xlsx wiring | Out-of-the-box ColumnDrawer and DownloadModal built-in |
| Type Safety & Guards | Prone to runtime errors on undefined fields | 100% dogfooded utility guards (isArray, isObject) |
5-Minute Quick Start
Render a full featured table with pagination, column sorting, and custom cells with just a configuration array:
1import React from "react";2import { DynamicTable } from "antd-dynamic-ui";34export default function UsersView() {5 return (6 <div className="p-6">7 <h2 className="text-xl font-bold mb-4">User Management</h2>8 <DynamicTable9 apiData={{10 apiUrl: "/api/v1/users",11 apiType: "get",12 params: { status: "active" },13 }}14 filterKey="users_grid"15 border={true}16 />17 </div>18 );19}