---
order: 1
title:
zh-CN: 自定义位置
en-US: Custom Placement
---
## zh-CN
自定义位置,点击触发按钮抽屉从相应的位置滑出,点击遮罩区关闭。
## en-US
The Drawer can appear from any edge of the screen.
```jsx
import { Drawer, Button, Radio, Space } from 'antd';
export default () => {
const [visible, setVisible] = React.useState(false);
const [placement, setPlacement] = React.useState('left');
const showDrawer = () => {
setVisible(true);
};
const onClose = () => {
setVisible(false);
};
const onChange = e => {
setPlacement(e.target.value);
};
return (
<>
top
right
bottom
left
Some contents...
Some contents...
Some contents...
>
);
};
```