---
order: 7
title:
zh-CN: 受控的预览
en-US: Controlled Preview
---
## zh-CN
可以使预览受控。
## en-US
You can make preview controlled.
```jsx
import React, { useState } from 'react';
import { Image, Button } from 'antd';
function ImageDemo() {
const [visible, setVisible] = useState(false);
return (
<>
{
setVisible(value);
},
}}
/>
>
);
}
export default () => ;
```