AdaptTable for Ant Design

Mobile cards in Ant Design

Below the mobile breakpoint every row becomes a Ant Design card. Same columns, same row content, same query state — there is nothing to configure and no second layout to build.

paginationMode="auto" resolves to infinite scroll on phones and a pager on desktop. Per column, mobileLabel and hideOnMobile tune what a card shows.

renderCard replaces the card's body with your own layout while the shell keeps selection, row actions and expansion — so a custom card is a layout decision, not a rewrite.

Each card is a small Card using antd's own title and extra slots for the leading and trailing controls, with the fields in a Descriptions list — antd's card stays small at either density, so compact tightens the gap between cards rather than the cards themselves.

The code

import { DataTable } from "@adapttable/antd";

export function People({ rows, columns }) {
  return (
    <DataTable
      data={rows}
      columns={columns}
      rowKey={(row) => row.id}
      paginationMode="auto"
      mobileBreakpoint={768}
      renderCard={(row, card) => (
        <MyCard row={row} {...card} />
      )}
    />
  );
}

Install

pnpm add @adapttable/antd @adapttable/core antd

The same feature in the other kits

More Ant Design features

Reference: mobile. More of this kit: AdaptTable for Ant Design, or the live demo.