# Drawer [component-header:sl-drawer] Drawers slide in from a container to expose additional options and information. ```html preview Lorem ipsum dolor sit amet, consectetur adipiscing elit. Close Open Drawer ``` ## Examples ### Slide in From Left To make the drawer slide in from the left, set the `placement` attribute to `left`. ```html preview This drawer slides in from the left. Close Open Drawer ``` ### Slide in From Top To make the drawer slide in from the top, set the `placement` attribute to `top`. ```html preview This drawer slides in from the top. Close Open Drawer ``` ### Slide in From Bottom To make the drawer slide in from the bottom, set the `placement` attribute to `bottom`. ```html preview This drawer slides in from the bottom. Close Open Drawer ``` ### Contained to an Element By default, the drawer slides out of its [containing block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#Identifying_the_containing_block), which is usually the viewport. To make the drawer slide out of its parent element, set this prop and add `position: relative` to the parent. ```html preview
The drawer will be contained to this box. This content won't shift or be affected in any way when the drawer opens. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Close
Open Drawer ``` ### Custom Size Use the `--size` custom property to set the drawer's size. This will be applied to the drawer's width or height depending on its `placement`. ```html preview This drawer is always 50% of the viewport. Close Open Drawer ``` ### Scrolling By design, a drawer's height will never exceed 100% of its container. As such, drawers will not scroll with the page to ensure the header and footer are always accessible to the user. ```html preview

Scroll down and give it a try! 👇

Close
Open Drawer ``` ### Ignoring Clicks on the Overlay By default, drawers are closed when the user clicks or taps on the overlay. To prevent this behavior, cancel the `slOverlayDismiss` event. ```html preview This drawer will not be closed when you click outside of it. Close Open Drawer ``` [component-metadata:sl-drawer]