I used this solution in order to adjust height of a
dashboardHeader()
shinydashboard
This is the code I’m using:
library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader( # Set height of dashboardHeader tagsstyle(".main-header {max-height: 200px}"), tags
style(".sidebar-toggle {height: 200px; padding-top: 1px !important;}"), tags
style(".left-side, .main-sidebar {padding-top: 200px}"), selectInput(inputId="1", label = "Label1", choices = "variable", "Variable:"), selectInput(inputId="2", label = "Label2", choices = "variable", "Variable:") ), dashboardBody( fluidRow( tabBox(width =12, tabPanel("Tab1", "First tab content"), tabPanel("Tab2", "Tab content 2")) ) ) ) server <- function(input, output){} shinyApp(ui, server)
This is a monitor display:
And this would be in a mobile viewport:
As you can see, both top of sidebar and body are hidden behind the new header height
Thank you
Anonymous Asked question May 13, 2021
Recent Comments