React framework for the use of project development, the choice of a suitable own UI library is extremely important, antd
is a good choice. antd
React UI component library is based on Ant Design system design, mainly used in back-end enterprise-class products. React component library is a high quality out of the box. Supports almost all current browsers (support IE11 and above), but also supports Electron desktop applications development.
Antd official website: https://ant.design/
1. Install
Use npm install:
cnpm i antd -S
Use yarn installation:
yarn add antd
2. Use
Before use, the need to introduce CSS style:
import 'antd/dist/antd.css';
In the formation of the need to use antd in demand related to the introduction of UI components:
import { Button } from 'antd';
ReactDOM.render(<Button />, document.getElementById('root'));
3. Check the official documentation
Login antd official website address: https://ant.design/
official website will not open, you can use the official mirror address: https://ant-design.gitee.io/index-cn
After opening the website, locate the component in navigation, View tutorial corresponding components according to their needs.
We are here to Button component, for example, you can view the code shows the component:
In the example of different UI styles, you can click the <>
button to see the source code, according to the source code examples, in reference to the project in the style component.
You can also view the API, configuration item attributes and learning components on the components:
Other components can be learned in accordance with the above method, using UI components are similar, the most important is to learn the API for each component of the configuration items.