ant-design/components/input/demo/size.md

35 lines
767 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
2016-05-25 18:21:27 +08:00
order: 1
title:
zh-CN: 三种大小
en-US: Three sizes of Input
2016-03-31 09:40:55 +08:00
---
2015-10-29 08:41:51 +08:00
## zh-CN
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),高度分别为 `40px`、`32px` 和 `24px`
2015-10-29 08:41:51 +08:00
## en-US
2019-02-06 20:51:46 +08:00
There are three sizes of an Input box: `large` (40px), `default` (32px) and `small` (24px).
```tsx
import { UserOutlined } from '@ant-design/icons';
2022-05-23 14:37:16 +08:00
import { Input } from 'antd';
import React from 'react';
2015-10-29 08:41:51 +08:00
const App: React.FC = () => (
<>
<Input size="large" placeholder="large size" prefix={<UserOutlined />} />
<br />
<br />
<Input placeholder="default size" prefix={<UserOutlined />} />
<br />
<br />
<Input size="small" placeholder="small size" prefix={<UserOutlined />} />
</>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```