logoAnt Design

⌘ K
  • 디자인
  • 개발
  • 컴포넌트
  • 블로그
  • 자료
5.21.3
  • React의 Ant Design
  • Ant Design of React
  • Ant Design of React
  • Changelog
    v5.21.3
  • 기본 사용법
    • 시작하기
    • Next.js에서 사용하기
      Updated
  • 如何使用
    • 在 create-react-app 中使用
    • 在 Vite 中使用
    • 在 Next.js 中使用
      Updated
    • 在 Umi 中使用
    • 在 Rsbuild 中使用
      New
    • 在 Farm 中使用
      New
    • 使用 Refine
      New
  • 迁移
    • 从 Less 变量到 Design Token
  • Basic Usage
    • Usage with create-react-app
    • Usage with Vite
    • Usage with Next.js
      Updated
    • Usage with Umi
    • Usage with Rsbuild
      New
    • Usage with Farm
      New
    • Usage with Refine
      New
  • 고급기능
    • 테마 커스터마이징
    • CSS 호환성
    • 서버 사이드 렌더링
    • 커스텀 날짜 라이브러리 사용하기
  • 进阶使用
    • 定制主题
    • 使用 CSS 变量
      New
  • Advanced
    • Customize Theme
    • CSS Variables
      New
    • Internationalization
    • Common Props
  • Migration
    • V4 to V5
    • Less variables to Component Token
  • 其他
    • 社区精选组件
    • 贡献指南
    • FAQ
  • Other
    • Third-Party Libraries
    • Contributing
    • FAQ

Usage with Refine

Resources

Ant Design Charts
Ant Design Pro
Ant Design Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
ahooks-React Hooks Library
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference
Work with Us

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

Refine is a React meta-framework designed for CRUD-heavy web applications. Its core hooks and components streamline development by offering solutions for authentication, access control, routing, networking, state management, and i18n.

It supports Ant Design with an integration package that includes ready-to-use components and hooks to connect Refine to Ant Design.

This article will guide you through bootstrapping a fully-functional CRUD application example using Refine and Ant Design.

Install and Initialization

Refine integrates easily with platforms like Vite, Next.js, Remix, React Native, and Electron through a simple routing interface without additional setup.

In this guide, we'll use Vite and the refine-antd preset from the create refine-app CLI for a quick start to create a new Refine project with Ant Design using predefined options.

Before all start, you may need install yarn or pnpm.

npm iconnpm
yarn iconyarn
pnpm iconpnpm
$ npm create refine-app@latest -- --preset refine-antd

Using the refine-antd preset eliminates the need for extra dependencies and add example pages built with Ant Design for a quick start.

After the initialization is complete, we enter the project and start.

$ cd antd-demo
$ npm run dev

Once initialization is complete, all Ant Design configurations are done automatically, allowing you to start using Ant Design components in your Refine app.

Open the browser at http://localhost:5173/ and you will see example CRUD app with Ant Design components.

Refine Ant Design example

Inspection the code

Let take a look at Ant Design usage in the one of the example component generated by the CLI command.

import { Create, useForm } from '@refinedev/antd';
import { Form, Input } from 'antd';
export const CategoryCreate = () => {
const { formProps, saveButtonProps } = useForm();
return (
<Create saveButtonProps={saveButtonProps}>
<Form {...formProps} layout="vertical">
<Form.Item label={'Title'} name={['title']} rules={[{ required: true }]}>
<Input />
</Form.Item>
</Form>
</Create>
);
};

While Refine's integration offers a set of components and hooks, it is not a replacement for the Ant Design package, you will be able to use all the features of Ant Design in the same way you would use it in a regular React application.

Refine's integration only provides components and hooks for an easier usage of Ant Design components in combination with Refine's features and functionalities.

How to Add Ant Design to an Existing Refine Project

You can follow the Refine Ant Design official guide to add Ant Design to an existing Refine project.

To bootstrap a Refine app with various integration options like Next.js and Remix, use npm create refine-app@latest and select Ant Design as the UI framework from the CLI.

For more detailed tutorials and guides with Ant Design, visit the Refine documentation.