--- 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 { Button, Cascader, DatePicker, Form, Input, InputNumber, Radio, Select, Switch, TreeSelect, } from 'antd'; import React, { useState } from 'react'; type SizeType = Parameters[0]['size']; const App: React.FC = () => { const [componentSize, setComponentSize] = useState('default'); const onFormLayoutChange = ({ size }: { size: SizeType }) => { setComponentSize(size); }; return (
Small Default Large
); }; export default App; ```