| Title: | Use a Shiny Bioconductor CSS loader |
|---|---|
| Description: | Add a Bioconductor themed CSS loader to your shiny app. It is based on the shinycustomloader R package. Use a spinning Bioconductor note loader to enhance your shiny app loading screen. This package is intended for developer use. |
| Authors: | Marcel Ramos [aut, cre] (ORCID: <https://orcid.org/0000-0002-3242-0582>) |
| Maintainer: | Marcel Ramos <[email protected]> |
| License: | Artistic-2.0 |
| Version: | 1.3.0 |
| Built: | 2026-05-30 09:46:57 UTC |
| Source: | https://github.com/bioc/shinybiocloader |
Add a loader to a Shiny UI element
withLoader(ui_element, loader = "biocspin", proxy.height = "400px")withLoader(ui_element, loader = "biocspin", proxy.height = "400px")
ui_element |
A Shiny UI element (e.g., |
loader |
|
proxy.height |
|
A Shiny UI element wrapped with the Bioconductor loader
shinycustomloader https://github.com/emitanaka/shinycustomloader
dna spin https://codepen.io/knut/pen/ZopMWW
library(shiny) library(shinydashboard) library(shinybiocloader) waitHist <- function() { waiting <- faithful[["waiting"]] Sys.sleep(3) # Simulate loading hist( waiting, col = 'darkgray', border = 'white', main = 'Old Faithful Geyser Waiting Times Histogram', xlab = 'Waiting Time (min)' ) } ui <- dashboardPage( dashboardHeader(title = "Bioconductor Loader"), dashboardSidebar(disable = TRUE), dashboardBody( h2("Bioconductor Spinning Loader"), HTML( paste0( "<pre><code class='language-r'>", "withLoader(plotOutput('distPlot'), loader='biocspin')", "</code></pre>" ) ), fluidRow( box( title = "With Loader", status = "primary", solidHeader = TRUE, withLoader(plotOutput("distPlot"), loader = "biocspin") ), box( title = "Without Loader", status = "warning", solidHeader = TRUE, plotOutput("distPlot2") ) ) ) ) server <- function(input, output) { output$distPlot <- renderPlot(waitHist()) output$distPlot2 <- renderPlot(waitHist()) } shinyApp(ui = ui, server = server)library(shiny) library(shinydashboard) library(shinybiocloader) waitHist <- function() { waiting <- faithful[["waiting"]] Sys.sleep(3) # Simulate loading hist( waiting, col = 'darkgray', border = 'white', main = 'Old Faithful Geyser Waiting Times Histogram', xlab = 'Waiting Time (min)' ) } ui <- dashboardPage( dashboardHeader(title = "Bioconductor Loader"), dashboardSidebar(disable = TRUE), dashboardBody( h2("Bioconductor Spinning Loader"), HTML( paste0( "<pre><code class='language-r'>", "withLoader(plotOutput('distPlot'), loader='biocspin')", "</code></pre>" ) ), fluidRow( box( title = "With Loader", status = "primary", solidHeader = TRUE, withLoader(plotOutput("distPlot"), loader = "biocspin") ), box( title = "Without Loader", status = "warning", solidHeader = TRUE, plotOutput("distPlot2") ) ) ) ) server <- function(input, output) { output$distPlot <- renderPlot(waitHist()) output$distPlot2 <- renderPlot(waitHist()) } shinyApp(ui = ui, server = server)