Skip to content

Conversation

@harikapadia999
Copy link

Description

Fixes #7138

Replaced deprecated variant="borderless" with bordered={false} in Ant Design CRUD components to maintain compatibility with Ant Design 5.21+ where the variant prop is deprecated.

Changes

Components Updated

  • Create component - Replaced variant="borderless" with bordered={false}
  • Edit component - Replaced variant="borderless" with bordered={false}
  • Show component - Replaced variant="borderless" with bordered={false}

Impact

Removes deprecation warnings - No more console warnings in Ant Design 5.21+
Maintains visual consistency - Cards still appear borderless
Backward compatible - Works with older Ant Design versions
Future-proof - Aligns with Ant Design's API direction

Visual Comparison

The visual appearance remains identical - cards continue to render without borders. This is purely an API compatibility fix.

Before:

<Card variant="borderless"> // ⚠️ Deprecated in Ant Design 5.21+

After:

<Card bordered={false}> // ✅ Recommended approach

Replace deprecated `variant="borderless"` with `bordered={false}` in Create component
to maintain compatibility with Ant Design 5.21+ where variant prop is deprecated.

Fixes refinedev#7138
Replace deprecated `variant="borderless"` with `bordered={false}` in Edit component
to maintain compatibility with Ant Design 5.21+ where variant prop is deprecated.

Fixes refinedev#7138
Replace deprecated `variant="borderless"` with `bordered={false}` in Show component
to maintain compatibility with Ant Design 5.21+ where variant prop is deprecated.

Fixes refinedev#7138
@harikapadia999 harikapadia999 requested a review from a team as a code owner December 16, 2025 06:22
@changeset-bot
Copy link

changeset-bot bot commented Dec 16, 2025

🦋 Changeset detected

Latest commit: 83b403a

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

This PR includes changesets to release 1 package
Name Type
@refinedev/antd 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

Copy link
Member

@alicanerdurmaz alicanerdurmaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @harikapadia999, thanks for your effort, but this PR is quite incorrect. We shouldn’t use bordered={false}; we need to use variant="borderless" instead. The bordered prop is not even mentioned in the docs: https://5x.ant.design/components/card

All we needed to do was bump the version in https://github.com/refinedev/refine/blob/main/packages/antd/package.json#L51 so that 5.23 can never be used (it’s probably not installed anywhere right now, but we should do it just in case).

image

@BatuhanW BatuhanW closed this Dec 29, 2025
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.

[BUG] Using unsupported variant prop on Ant Design Card component in non-compatible version

3 participants