Description
@rc-component/drawer is an accessible React drawer component that slides in from the edge of the screen. It is part of the Ant Design ecosystem and is maintained by the rc-component team. It supports drawers on the left, right, top and bottom, and it renders through a portal. Users can close it by clicking the mask, by pressing Escape, or through the focus management that the component provides. Nested drawers can push one another, and a drawer can have a fixed size, resizable panels or a custom container. The open and close transitions can be configured. The README documents the properties in a table, including afterOpenChange for the end of the animation, autoFocus, destroyOnHidden to unmount the drawer when it closes, drawerRender for custom panel content, focusTrap, getContainer to choose the mount node or render inline, a mask with its own class and style, and maskClosable. It also notes that height is deprecated in favour of size for top and bottom drawers. The project has a local dumi site with examples and is released under the MIT licence. It suits React developers who need a side panel with accessible focus handling.…
Highlights
- Left, right, top and bottom placements
- Portal rendering with mask and Escape close
- Nested drawers with push behaviour
- Resizable panels and custom containers
Ratings & Reviews
No ratings yet
Be the first to rate rc-drawer.
People also visit
rc-drawer FAQ
What does the drawer component do?
It shows a side panel in a React app, opening from the left, right, top or bottom, with a mask and focus management.
How does it close?
By clicking the mask, pressing Escape, or with the close logic in your own code, when maskClosable and keyboard are enabled.
Does it support resizing?
Yes. The README mentions resizable panels, and a defaultSize for an uncontrolled resizable drawer.
Is it part of Ant Design?
It is part of the Ant Design ecosystem, and the README says it is maintained by the rc-component team.
What license is it under?
MIT, according to the repository.
What are the best rc-drawer alternatives?
Popular alternatives to rc-drawer include rmc-drawer, react-native-drawer-layout and @rc-component/portal. See all rc-drawer alternatives
















