useOverlay: Manually set up a Shiny app to use overshiny

View source: R/ui.R

useOverlayR Documentation

Manually set up a Shiny app to use overshiny

Description

overshiny will set up automatically if you have an overlayPlotOutput() anywhere in your Shiny UI, which you probably do if you are using this package. But if you don't, you can set up overshiny by manually putting useOverlay() somewhere in your Shiny app's UI.

Usage

useOverlay()

Details

This also calls shinyjs::useShinyjs(), as overshiny depends on shinyjs.

Value

Returns an HTML dependency that sets up your Shiny app to use overshiny.

See Also

overlayServer(), for a complete example.

Examples

ui <- shiny::fluidPage(
    useOverlay() # only needed if no overlayPlotOutput() elements below
    # further UI elements here . . .
)

server <- function(input, output) {
    # server code here . . .
}

if (interactive()) {
    shiny::shinyApp(ui, server)
}


overshiny documentation built on Sept. 9, 2025, 5:50 p.m.