Skip to content

busyIndicatorOptions: use color of custom svg #4207

Open
@rwaaijman

Description

@rwaaijman

I would like to use a custom svg to as busyindicator, but this custom svg contains multiple colors. Is it possible to use the custom colors, instead of a standard color?

library(bslib)
library(shiny)

ui <- page_fillable(
  useBusyIndicators(),
  busyIndicatorOptions(spinner_type = "spinner.svg", spinner_size = "150px"),
  # busyIndicatorOptions(spinner_type = "bars"),
  plotOutput("plot")
)

server <- function(input, output, session) {
  output$plot <- renderPlot({
    Sys.sleep(5)
    plot(x = rnorm(100), y = rnorm(100))
  })
}

shinyApp(ui, server)

and the svg (spinner.svg):

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions