Code Monkey home page Code Monkey logo

Comments (3)

wsurles avatar wsurles commented on August 22, 2024 2

My app is structured like this...
ui.R

shinyUI(
  dashboardPage(
    dashboardHeader(title = 'My Title'),
    dashboardSidebar(
      sidebarMenu(
        menuItem("My Tab", tabName = "my_tab"),
      )
    ),
    dashboardBody(
      includeCSS("www/custom.css"),
      tabItems(
        tabItem(tabName = "my_tab", uiOutput("my_tab_content")),
      )
    )
  )
)

custom.css in the www directory

.content-wrapper,
.right-side {
  background-color: #ffffff;
}

I did not have much luck trying to change the sidebar menu colors. There are open and active states and I think they all need to be set individually or you will see the dark gray at times.

Sorry for taking so long to respond. Hopefully you can at least get your custom css file working from this and then explore customizations.

from shinydashboard.

wsurles avatar wsurles commented on August 22, 2024

Figured it out. I needed...

.content-wrapper,
.right-side {
background-color: #ffffff;
}

from shinydashboard.

mtseman avatar mtseman commented on August 22, 2024

Hey, I can't get this to work and have tried everywhere. I couldn't even get it to read a custom css file like they said on the shiny site. I must be missing something, I tried the following below, my sidebar was on the left so I changed that from your code.

The shinydashboard used to default to a grey sidebar, but changed to black when I updated the package. I'd like to make the sidebar background grey with black text and main panel white background.

I think I must be missing something, I am trying to put your code in here

Thanks in advance if you can help

sidebar <- dashboardSidebar(

  tags$head(tags$style(HTML('
      body > .content-wrapper,
              .left-side {background-color: #ffffff;
                          }'))),

  sidebarMenu(
    menuItem("Login", tabName = "login",icon=icon("check")),
    menuItem("Set Filters", tabName = "filters",icon=icon("filter")),
    menuItem("RAD 2.0", tabName = "summary", icon = icon("sliders")),#icon = icon("bar-chart")),
    menuItem("The 5 Policy Questions", tabName = "policy", icon = icon("question")),#icon = icon("line-chart")),
    menuItem("ROI 1.0", tabName = "roi", icon = icon("line-chart")),
    menuItem("Model Maker", icon = icon("database"),
             menuSubItem("New Model", tabName = "model"),
             menuSubItem("Model Worksheets", tabName = "worksheets"),
             menuSubItem("Model Editor", tabName = "edit"),
             menuSubItem("Model Preview", tabName = "preview"),
            # menuSubItem("Program Review", tabName = "review"),
            # menuSubItem("Program Costing", tabName = "costing"),
             menuSubItem("Model Save", tabName = "save")),
    menuItem("Message Center",tabName="message", icon = icon("rss")),
    menuItem("About", tabName = "about", icon = icon("glass"))
    )

)

from shinydashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.