We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi!
I'm using bs4Dash with the dark theme. Is there any way to make WinBox reactive to the theme?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello, To achieve this you'll have to add some CSS to your application :
.wb-body { background: #f4f6f9; } .dark-mode .wb-body { background: #454d55; }
Here's a full example:
library(shiny) library(shinyWidgets) library(bs4Dash) ui <- dashboardPage( dashboardHeader(title = "Basic dashboard"), dashboardSidebar(), dashboardBody( ##### Winbox part ##### html_dependency_winbox(), tags$style( ".wb-body { background: #f4f6f9; }", ".dark-mode .wb-body { background: #454d55; }" ), actionButton(inputId = "show", label = "Show WinBox"), ##### ##### ##### ##### # Boxes need to be put in a row (or column) fluidRow( box(plotOutput("plot1", height = 250)), box( title = "Controls", sliderInput("slider", "Number of observations:", 1, 100, 50) ) ) ) ) server <- function(input, output) { set.seed(122) histdata <- rnorm(500) output$plot1 <- renderPlot({ data <- histdata[seq_len(input$slider)] hist(data) }) ##### Winbox part ##### observeEvent(input$show, { WinBox( title = "WinBox window", ui = tagList( tags$h2("Hello from WinBox!"), "Text content of winbox.", selectInput("month", "Select a month:", month.name) ) ) }) ##### ##### ##### ##### } shinyApp(ui, server)
Victor
Sorry, something went wrong.
No branches or pull requests
Hi!
I'm using bs4Dash with the dark theme. Is there any way to make WinBox reactive to the theme?
Thanks!
The text was updated successfully, but these errors were encountered: