Skip to content

feat(antd): add support for Ant Design v6 - #7629

Open
trantam246 wants to merge 1 commit into
refinedev:mainfrom
trantam246:feat/antd-v6
Open

trantam246 wants to merge 1 commit into
refinedev:mainfrom
trantam246:feat/antd-v6

Conversation

@trantam246

Copy link
Copy Markdown

Resolves #7140

Summary

Adds Ant Design v6 support to @refinedev/antd (major) and @refinedev/inferencer (major, peer dependency change), following the precedent of #7208 (MUI X v8): the antd peer now targets ^6.6.5 and @ant-design/icons ^6.3.4.

Builds on the earlier attempts in #7177 (@mistervaibhav) and #7392 (@arndom) — thank you both. This PR starts from the current main, keeps the lockfile change minimal, and was run against every CI step locally before opening.

What changed

@refinedev/antd

  • No more @ant-design/pro-layout. Its stable releases still declare antd ^4 || ^5. <PageHeader /> is now implemented in-package with the same props (PageHeaderProps) and the same ant-page-header* class names, styled through Ant Design's own style utilities (@ant-design/cssinjs-utils), so it follows theme switches, nested ConfigProviders, CSS variables and StyleProvider layers, and user CSS on those classes keeps working. Breadcrumb routes are converted to items like pro-layout did; compact mode is measured on the header width (ResizeObserver).
  • <ThemedSider /> uses the Menu items API, so it no longer logs [antd: Menu] children is deprecated. Access control is unchanged: denied items (including nested ones) are not rendered. The render prop additionally receives menuItems / logoutItem and may return an item array; existing render functions returning items / logout elements keep working. New <CanAccessMenuItems /> helps custom siders filter a useMenu tree.
  • Non-deprecated v6 APIs: useTable pagination placement (bottomRight → bottomEnd), useDrawerForm size, notification title, Drawer size/mask.closable, Space orientation, size="medium", useModal/useDrawer handler types from antd.
  • useSelect still returns onSearch/filterOption: rc-select marks them @deprecated at type level only and antd 6 emits no runtime warning for them, so changing the public return shape was left out of this PR.

@refinedev/inferencer

  • Generated code already used only non-deprecated props; the error view uses Alert title. Antd inferencer tests now fail on any [antd: deprecation warning, so generators can't regress.

Examples, e2e, docs

  • All 79 antd examples in the pnpm workspace build on v6; @ant-design/v5-patch-for-react-19 removed from them. Examples outside the workspace (blog-*, monorepo-*, with-nx, …) are untouched.
  • Cypress selectors updated to the v6 DOM (measured on rendered antd 6.6.5): .ant-select-selection-item → .ant-select-content-has-value, .ant-select-selector → .ant-select-content, .ant-modal-content → .ant-modal-container, .ant-drawer-content → .ant-drawer-section, loading overlay → .ant-spin-spinning.
  • New migration guide page Ant Design v5 to v6; use-table, use-drawer-form and themed-layout docs updated; Sandpack previews pinned to antd ^6.6.5.

Local verification (Node 22, pnpm 9 — same as CI)

Step Result
pnpm lint:ci ✅
pnpm sp lint ✅
pnpm test:all ✅ all packages (@refinedev/antd 497 passed / 2 skipped, @refinedev/inferencer 240 passed). Note: with full parallelism on my machine a few timing-based tests (useStepsForm, mui useDataGrid interval) time out; they pass alone and with --concurrency=2.
pnpm publint:all / pnpm attw:all ✅
Build of all 79 antd examples ✅
Cypress e2e of the 27 antd examples with e2e suites ✅ except the pre-existing ones below

Pre-existing e2e failures, also failing on main:

  • auth-auth0 › should redirect to /login if user not authenticated — fails identically in the scheduled run on main (run 37579846255, chunk 1).
  • with-nextjs › should has 'to' param… / should register — fail the same way on an origin/main checkout on my machine (redirect timing); they pass on CI's scheduled runs.
  • table-antd-table-filter only fails when the machine is not in UTC (date assertion); passes with TZ=UTC like CI.

- bump antd to ^6.6.5 and @ant-design/icons to ^6.3.4
- replace @ant-design/pro-layout PageHeader with an in-package implementation styled via antd style utils
- migrate ThemedSider to the Menu items API with access control (CanAccessMenuItems)
- use non-deprecated antd v6 APIs across @refinedev/antd, inferencer and examples
- update cypress selectors to the antd v6 DOM
- add Ant Design v5 to v6 migration guide

Resolves refinedev#7140
@changeset-bot

changeset-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b92cbb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 92 packages
Name Type
@refinedev/antd Major
@refinedev/inferencer Major
@refinedev/live-previews Patch
access-control-casbin Patch
access-control-cerbos Patch
access-control-permify Patch
app-crm-minimal Patch
auth-antd Patch
auth-auth0 Patch
auth-google-login Patch
auth-keycloak Patch
auth-kinde Patch
auth-otp Patch
base-antd Patch
calendar-app Patch
command-palette-kbar Patch
customization-footer Patch
customization-login Patch
customization-offlayout-area Patch
customization-rtl Patch
customization-sider Patch
customization-theme-antd Patch
customization-top-menu-layout Patch
data-provider-airtable Patch
data-provider-appwrite-tutorial-docs Patch
data-provider-appwrite Patch
data-provider-graphql Patch
data-provider-hasura Patch
data-provider-multiple Patch
data-provider-nestjs-query Patch
data-provider-nestjsx-crud Patch
data-provider-sanity Patch
data-provider-strapi-v4 Patch
data-provider-strapi Patch
data-provider-supabase Patch
field-antd-use-checkbox-group Patch
field-antd-use-radio-group Patch
field-antd-use-select-basic Patch
field-antd-use-select-infinite Patch
finefoods-antd Patch
form-antd-custom-validation Patch
form-antd-mutation-mode Patch
form-antd-use-drawer-form Patch
form-antd-use-form Patch
form-antd-use-modal-form Patch
form-antd-use-steps-form Patch
i18n-nextjs Patch
i18n-react Patch
import-export-antd Patch
inferencer-antd Patch
inferencer-graphql-hasura Patch
input-custom Patch
input-date-picker Patch
invoicer Patch
live-provider-ably Patch
loading-overtime Patch
multi-level-menu Patch
pixels-admin Patch
pixels Patch
refine-week-invoice-generator Patch
search Patch
server-side-form-validation-antd Patch
table-antd-advanced Patch
table-antd-table-filter Patch
table-antd-use-delete-many Patch
table-antd-use-editable-table Patch
table-antd-use-table Patch
table-antd-use-update-many Patch
template-antd Patch
theme-antd-demo Patch
tutorial-antd Patch
upload-antd-base64 Patch
upload-antd-multipart Patch
use-modal-antd Patch
use-simple-list-antd Patch
with-custom-pages Patch
with-javascript Patch
with-meta-properties Patch
with-nextjs-next-auth Patch
with-nextjs Patch
with-remix-antd Patch
with-remix-auth Patch
with-web3 Patch
inferencer-chakra-ui Patch
inferencer-headless Patch
inferencer-mantine Patch
inferencer-material-ui Patch
tutorial-chakra-ui Patch
tutorial-headless Patch
tutorial-mantine Patch
tutorial-material-ui Patch
with-remix-material-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trantam246

Copy link
Copy Markdown
Author

Hi @alicanerdurmaz @DoguhanOzgurAkca 👋

This is my first contribution to refine, so the workflows need a maintainer's approval to run. Could you please approve them when you have a moment?

Before opening the PR I ran every CI step locally (Node 22 / pnpm 9): lint, syncpack, test:all, publint, attw, the build of all 79 antd examples, and the Cypress e2e of the 27 antd examples that have suites. The only e2e failures I saw also fail on main; the details are in the PR description.

Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Support Ant Design v6

1 participant