A React UI component library based on the Ant Design design system

A React UI component library based on the Ant Design design system

2022-09-14 0 1,136
Resource Number 38398 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

The antd recommended in this issue is a React UI component library based on the Ant Design design system, which is mainly used for the development of enterprise-level middle and back-office products.

A React UI component library based on the Ant Design design system插图

characteristic
Extracted from the interactive language and visual style of enterprise-level middle and back office products.
High-quality React components out of the box.
Developed using TypeScript, a complete type definition file is provided.
Full-link development and design tool system.
Dozens of international languages are supported.
Customization of the theme in every detail is possible.
Installation

Install using npm or yarn

$ npm install antd –save
$ yarn add antd

Browser introduce

Ingest files directly in the browser using script and link tags, and use the global variable antd.

We provide antd.js antd.css and antd.min.js antd.min.css in the antd/dist directory in the npm distribution.

Example:

import { DatePicker } from ‘antd’;

ReactDOM.render(<DatePicker />, mountNode);

Introducing Styles:

import ‘antd/dist/antd.css’; // or ‘antd/dist/antd.less’
Get started quickly

The first example

This is an online codesandbox demo of the simplest Ant Design component.

A React UI component library based on the Ant Design design system插图1

1. Create a codesandbox

visit
http://u.ant.design/codesandbox-repro Create an online example of CodeSandbox and don’t forget to save it to create a new instance.

2. Use components

Replace the contents of index.js directly with the following code, and use the antd component directly in React.

import React, { useState } from ‘react’;
import { render } from ‘react-dom’;
import { ConfigProvider, DatePicker, message } from ‘antd’;
Since the default text of the antd component is English, it needs to be modified to Chinese
import zhCN from ‘antd/lib/locale/zh_CN’;
import moment from ‘moment’;
import ‘moment/locale/zh-cn’;
import ‘antd/dist/antd.css’;
import ‘./index.css’;

moment.locale(‘zh-cn’);

const App = () => {
const [date, setDate] = useState(null);
const handleChange = value => {
message.info(‘The date you selected is: ${value ? value.format(‘YYYYY MM month DD day’) : ‘not selected’}’);
setDate(value);
};
return (
<ConfigProvider locale={zhCN}>
<div style={{ width: 400, margin: ‘100px auto’ }}>
<DatePicker onChange={handleChange} />
<div style={{ marginTop: 16 }}>
Current Date: {date ? date.format(‘YYYYY-mm-dd-day’): ‘Not selected’}
</div>
</div>
</ConfigProvider>
);
};

render(<App />, document.getElementById(‘root’));
Customize the theme

Ant Design design specifications and technology support flexible style customization to meet the diverse visual needs of business and brand, including but not limited to global styles (main colors, rounded corners, borders) and visual customization of specified components.

A React UI component library based on the Ant Design design system插图2

Style variables for Ant Design

Here are some of the most commonly used generic variables, all of which can be found here.

@primary-color: #1890ff; Global dominant color
@link-color: #1890ff; Link color
@success-color: #52c41a; Success color
@warning-color: #faad14; Warning color
@error-color: #f5222d; Wrong color
@font-size-base: 14px; Main font size
@heading-color: rgba(0, 0, 0, 0.85); Title color
@text-color: rgba(0, 0, 0, 0.65); Primary text color
@text-color-secondary: rgba(0, 0, 0, 0.45); Secondary text color
@disabled-color: rgba(0, 0, 0, 0.25); Invalid color
@border-radius-base: 2px; Component/float fillet
@border-color-base: #d9d9d9; Border color
@box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 9px 28px 8px rgba(0, 0, 0, 0.05); Floating shadows

Official theme

A React UI component library based on the Ant Design design system插图3
资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code A React UI component library based on the Ant Design design system https://ictcoder.com/kyym/a-react-ui-component-library-based-on-the-ant-design-design-system.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service