|If true, the Drawer will be visible.|
|HTML tag or React Component to render the component as.|
|Content of the Drawer.|
|Additional CSS classes.|
|HTML tag or React Component to finally render the component as.|
|If true, removes the component from the real DOM when closed. For full virtual DOM unmount(if necessary), perform at a parent level.|
|Callback fired after Drawer closes.|
|Callback fired after Drawer opens.|
|Callback fired before Drawer closes.|
|Callback fired before Drawer opens.|
|Callback fired when a click action occurs outside of the Drawer.|
|Used to determine which side of the viewport the Drawer should open from.|
|The position of the Drawer.|
|Determines whether a drop shadow should be visible along the edge of the Drawer for contrast purposes.|
|The width or height that the Drawer will open to, depending on its placement.|
|Determines the speed of the transition. This value comes from |
The Drawer component is capable of showing and hiding its content with or without animation. When the Drawer opens, it will open on top of any other content. If you would like the Drawer to push and pull content on the page rather than open on top of it, consider using the ExpandCollapse component instead.
For more information on how to use the features and props for this component, check out the developer documentation.
The Drawer component can be anchored on any of the four edge boundaries (top, right, bottom, left) by setting the placement prop. Declare a size for the Drawer in order to set how far out the Drawer will open to. Drawers will always expand to 100% of the height (when using left or right) or width (when using top or bottom) of the viewport or containing element.
You can control how quickly the Drawer opens and closes by by passing a CSS time value to transitionSpeed, which is a string containing any positive number directly followed by 's' or 'ms'. If you would like no transition, pass 0 the to transitionSpeed prop.
If you would like to close a Drawer on any user click outside of the Drawer content, use the onOuterClick callback function. Additional callback functions are provided to allow for event handling before and after the Drawer opens and closes.
When a Drawer position is set to fixed, it will fill the entire edge of the viewport that is set by the placement prop. However, by setting the position prop to absolute, you can place the Drawer within a containing element. The Drawer will then be bound by that container.
When using a contained Drawer, make sure the direct parent element to the Drawer has style settings
position: relative and
overflow: hidden. This ensures that when the Drawer is closed, it will not be visible outside of the bounds of that parent element.