Creates a panel for containing arbitrary content within a flex box container.
This is mainly useful within miniPage() or a
miniTabPanel(). You can use miniContentPanel to introduce
padding and/or scrolling, but even if padding/scrolling aren't needed, it's a
good idea to wrap your custom content into miniContentPanel as it
fixes some odd behavior with percentage-based heights.
miniContentPanel(..., padding = 15, scrollable = TRUE)UI objects to be contained in the miniContentPanel. A
single htmlwidget or shiny::plotOutput() with
height="100%" works well, as do
shiny::fillRow()/shiny::fillCol().
Amount of padding to apply. Can be numeric (in pixels) or
character (e.g. "3em").
If TRUE, then content large enough to overflow the
miniContentPanel will make scrollbars appear.
For more information, see the Designing Gadget UI article on shiny.rstudio.com.
library(shiny)
miniContentPanel(padding = 0,
plotOutput("plot", height = "100%")
)
#> <div class="gadget-scroll">
#> <div class="gadget-content">
#> <div class="gadget-absfill" style="position: absolute; top:0px;right:0px;bottom:0px;left:0px;;">
#> <div class="shiny-plot-output html-fill-item" id="plot" style="width:100%;height:100%;"></div>
#> </div>
#> </div>
#> </div>