Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use ant-design-pro components in ant-design react app?

I have created react app with create-react-app and used ant-design components, as the project becomes bigger, I need to use some awesome components from ant-design-pro.

Is there any way to integrate ant-design-pro components in existing ant-design project?

I have tried to import and use @ant-design/pro-layout but didn't work for me.

like image 810
Drisha Avatar asked Jun 07 '19 05:06

Drisha


People also ask

What is Ant Design Pro?

Ant Design Pro is a production-ready solution for admin interfaces. Built on the design principles developed by Ant Design , this project introduces higher level components; we have developed templates, components, and a corresponding design kit to improve the user and development experience for admin interfaces.

Can we use antd and material UI together?

Yes, It is ok to use multiple frameworks in a single app. You can use antd or material-ui components with their import statement.


1 Answers

For V4 refer to Upgrade to V4, check Replace BasicLayout if you use @ant-design/pro-layout.

For single components use npm install [email protected] and import components for your needs:

import Ellipsis from 'ant-design-pro/lib/Ellipsis';

Demo:

Edit OS Q 56488542

like image 50
Dennis Vash Avatar answered Sep 16 '22 16:09

Dennis Vash