--- order: 3.1 title: zh-CN: 表单尺寸 en-US: Form size --- ## zh-CN 设置表单组件尺寸,仅对 antd 组件有效。 ## en-US Set component size, only works for antd components. ```tsx import React, { useState } from 'react'; import { Form, Input, Button, Radio, Select, Cascader, DatePicker, InputNumber, TreeSelect, Switch, } from 'antd'; const FormSizeDemo = () => { const [componentSize, setComponentSize] = useState('default'); const onFormLayoutChange = ({ size }) => { setComponentSize(size); }; return (
Small Default Large
); }; ReactDOM.render(, mountNode); ```