Using shinythemes

Let's give the whole application a lick of paint using the shinythemes package. If you haven't already done so, install it with install.packages("shinythemes"). The documentation (including a list of the available themes) can be found at rstudio.github.io/shinythemes/. Load the package and pass a theme into fluidPage():

library(shinythemes) 
fluidPage(  theme = shinytheme("darkly"),   ... rest of UI... 

If you want to choose your theme interactively, instead add themeSelector() to your UI definition, and a little interactive chooser will appear on your app. Once you're happy with it, use the previous code format to make that the default choice in your app:

library(shinythemes) 
fluidPage(  themeSelector(),  ... rest of UI... ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.