Custom Drawer bound to a DOM element by id. See 'js/src/MuiDrawerTriggerId.jsx'.
Arguments
- triggerId
HTML id of an existing DOM element that acts as the trigger (button, link, etc.) to open the Drawer.
- ...
Named arguments forwarded as React props, plus children to render inside the component. Pass
closeOnLinkClick = FALSEto keep the Drawer open when any link inside it is clicked. The default (TRUE) closes the Drawer on any<a>click, including external links withtarget = "_blank".sxstyles the Drawer root, as on any other component. Size the drawer paper withwidth(280 by default) or style it viaslotProps = list(paper = list(sx = list(...))). Theopenprop is owned by the wrapper (that is the point of.triggerId); a caller-suppliedonCloseis called after the wrapper closes itself.
Examples
if (FALSE) { # interactive()
library(shiny)
library(muiMaterial)
ui <- muiMaterialPage(
Button(id = "openDrawer", "Open drawer"),
Drawer.triggerId("openDrawer", anchor = "left", "Drawer content here")
)
shinyApp(ui, function(input, output, session) {})
}
