Skip to content

busyIndicatorOptions: use color of custom svg #4207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rwaaijman opened this issue Apr 10, 2025 · 0 comments
Open

busyIndicatorOptions: use color of custom svg #4207

rwaaijman opened this issue Apr 10, 2025 · 0 comments

Comments

@rwaaijman
Copy link

rwaaijman commented Apr 10, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant