--- order: 21 title: zh-CN: 聚焦 en-US: Focus --- ## zh-CN 聚焦额外配置属性。 ## en-US Focus with additional option. ```tsx import { Input, Space, Button, Switch } from 'antd'; const Demo = () => { const inputRef = React.useRef(null); const [input, setInput] = React.useState(true); const sharedProps = { style: { width: '100%' }, defaultValue: 'Ant Design love you!', ref: inputRef, }; return ( { setInput(!input); }} /> {input ? : } ); }; ReactDOM.render(, mountNode); ```