Drawer
Sidebar Menu with a Drawer and State
This example shows how to create a sidebar menu with a drawer. The drawer is opened by clicking a button. The drawer contains links to different sections of the page. When a link is clicked the drawer closes and the page scrolls to the section.
The rx.drawer.root
component has an open
prop that is set by the state variable is_open
. Setting the modal
prop to False
allows the user to interact with the rest of the page while the drawer is open and allows the page to be scrolled when a user clicks one of the links.
Test1
Test2
API Reference
rx.drawer.trigger
The button that opens the dialog.
Event Triggers
See the full list of default event triggersrx.drawer.overlay
A layer that covers the inert portion of the view when the dialog is open.
Event Triggers
See the full list of default event triggersrx.drawer.portal
Portals your drawer into the body.
Event Triggers
See the full list of default event triggersrx.drawer.close
A button that closes the drawer.