A panel which slides in from the edge of the screen.
| Property | Description | Type | Default |
|---|---|---|---|
afterVisibleChange | Callback after the animation ends when switching drawers. | function(visible) | - |
bodyStyle | Style of the drawer content part | object | - |
className | The class name of the container of the Drawer dialog. | string | - |
closable | Whether a close (x) button is visible on top right of the Drawer dialog or not. | boolean | true |
closeIcon | custom close icon | ReactNode | |
destroyOnClose | Whether to unmount child components on closing drawer or not. | boolean | false |
drawerStyle | Style of the popup layer element | object | - |
footer | The footer for Drawer. | ReactNode | - |
footerStyle | Style of the drawer footer part. | CSSProperties | - |
forceRender | Prerender Drawer component forcely | boolean | false |
getContainer | Return the mounted node for Drawer. | HTMLElement | () => HTMLElement | Selectors | false | 'body' |
headerStyle | Style of the drawer header part | object | - |
height | placement is top or bottom, height of the Drawer dialog. | string|number | 160 |
keyboard | Whether support press esc to close | boolean | true |
mask | Whether to show mask or not. | boolean | true |
maskClosable | Clicking on the mask (area outside the Drawer) to close the Drawer or not. | boolean | true |
maskStyle | Style for Drawer's mask element. | CSSProperties | {} |
placement | The placement of the Drawer. | top | right | bottom | left | right |
push | Nested drawers push behavior | boolean | { distance: string | number } | { distance: 180 } |
style | Style of wrapper element which contains mask compare to drawerStyle | CSSProperties | - |
title | The title for Drawer. | string|ReactNode | - |
visible | Whether the Drawer dialog is visible or not. | boolean | false |
width | Width of the Drawer dialog. | string|number | 300 |
zIndex | The z-index of the Drawer. | Number | 1000 |
onClose | Specify a callback that will be called when a user clicks mask, close button or Cancel button. | function(e) | - |