You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
4.7 KiB

9 years ago
<p align="center">
<a href="http://ant.design">
<img width="320" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg">
</a>
</p>
# Ant Design
8 years ago
[![](https://img.shields.io/travis/ant-design/ant-design.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design)
8 years ago
[![Coverage Status](https://coveralls.io/repos/github/ant-design/ant-design/badge.svg?branch=master)](https://coveralls.io/github/ant-design/ant-design?branch=master)
[![Dependency Status](https://img.shields.io/david/ant-design/ant-design.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design)
8 years ago
8 years ago
[![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
[![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd)
8 years ago
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/ant-design/ant-design.svg)](http://isitmaintained.com/project/ant-design/ant-design "Average time to resolve an issue")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
An enterprise-class UI design language and React-based implementation.
10 years ago
## Features
10 years ago
9 years ago
- An enterprise-class design language and high quality UI.
- Graceful UI components out of the box, base on [React Component](http://react-component.github.io/badgeboard/).
8 years ago
- Written in TypeScript with complete define types.
- A npm + webpack + babel + [dora](https://github.com/dora-js/dora) + [dva](https://github.com/dvajs/dva) development framework.
10 years ago
## Let's build a better antd together
`antd` is an open source project, any reasonable improvement is welcomed. If you are interested in contributing to `antd`, you can watch this repository and join in [discussion](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3ADiscussion), or try to implement some [features which had been accepted](https://github.com/ant-design/ant-design/issues?q=is%3Aopen+is%3Aissue+label%3A%22PR+welcome%22).
9 years ago
## Install
```bash
npm install antd
```
9 years ago
## Usage
10 years ago
9 years ago
### Use prebuilt bundle
```jsx
import { DatePicker } from 'antd';
ReactDOM.render(<DatePicker />, mountNode);
```
9 years ago
9 years ago
And import style manually:
```jsx
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
```
9 years ago
### Use modularized antd
- Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
9 years ago
9 years ago
```js
// .babelrc
{
"plugins": [["import", { libraryName: "antd", style: "css" }]]
9 years ago
}
```
9 years ago
9 years ago
Then you can import components from antd directly.
9 years ago
9 years ago
```jsx
// import js and css modularly, parsed by babel-plugin-import
9 years ago
import { DatePicker } from 'antd';
9 years ago
```
9 years ago
9 years ago
- Manually import
```jsx
import DatePicker from 'antd/lib/date-picker'; // just for js
import 'antd/lib/date-picker/style/css'; // with style
9 years ago
```
9 years ago
9 years ago
## Browser Support
8 years ago
Normal browsers and Internet Explorer 9+.
9 years ago
> [IE8 issues](https://github.com/xcatliu/react-ie8)
9 years ago
9 years ago
## TypeScript
9 years ago
tsconfig.json
8 years ago
```js
9 years ago
{
"compilerOptions": {
"moduleResolution": "node",
"jsx": "preserve",
"allowSyntheticDefaultImports": true
9 years ago
}
}
9 years ago
```
## Links
10 years ago
- [Home page](http://ant.design/)
8 years ago
- [UI library](http://ant.design/docs/react/introduce)
8 years ago
- [Change Log](CHANGELOG.en-US.md)
- [Scaffold tool](https://github.com/ant-design/antd-init/)
- [Development tool](http://ant-tool.github.io/)
9 years ago
- [React components](http://react-component.github.io/)
8 years ago
- [Mobile UI](http://mobile.ant.design)
8 years ago
- [Motion](https://motion.ant.design)
9 years ago
- [Developer Instruction](https://github.com/ant-design/ant-design/wiki/Development)
9 years ago
- [Versioning Release Note](https://github.com/ant-design/ant-design/wiki/%E8%BD%AE%E5%80%BC%E8%A7%84%E5%88%99%E5%92%8C%E7%89%88%E6%9C%AC%E5%8F%91%E5%B8%83%E6%B5%81%E7%A8%8B)
8 years ago
- [Boilerplates](https://github.com/ant-design/ant-design/issues/129)
- [FAQ](https://github.com/ant-design/ant-design/wiki/FAQ)
- [CodePen boilerplate](http://codepen.io/benjycui/pen/KgPZrE?editors=001) for bug reports
8 years ago
- [Awesome Ant Design](https://github.com/websemantics/awesome-ant-design)
8 years ago
- [Customize Theme](https://github.com/ant-design/antd-init/tree/master/examples/customize-antd-theme)
8 years ago
## Contributing
9 years ago
We welcome all contributions, please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as a [GitHub issue](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instruction](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :)