Commercial enterprise offerings Open source packages - Quarto, Shiny, and more

shinythemes 1.1.1

portrait of Winston Chang in front of windows facing trees
Written by Winston Chang
2016-10-13

If there’s one word that could describe the default styling of Shiny applications, it might be “minimalist.” Shiny’s UI components are built using the Bootstrap web framework, and unless the appearance is customized, the application will be mostly white and light gray.

Fortunately, it’s easy to add a bit of flavor to your Shiny application, with the shinythemes package. We’ve just released version 1.1.1 of shinythemes, which includes many new themes from bootswatch.com, as well as a theme selector which you can use to test out different themes on a live Shiny application.

Here’s an example of the theme selector in use (try out the app here):

theme-selector

To install the latest version of shinythemes, run:

install.packages("shinythemes")

To use the theme selector, all you need to do is add this somewhere in your app’s UI code:

shinythemes::themeSelector()

Once you’ve chosen which theme you want, all you need to do is use the theme argument of the bootstrapPage, fluidPage, navbarPage, or fixedPage functions. If you want to use “cerulean”, you would do this:

fluidPage(theme = shinytheme("cerulean"),
  ...
)

To learn more and see screenshots of the different themes, visit the shinythemes web page. Enjoy!

portrait of Winston Chang in front of windows facing trees

Winston Chang

Software Engineer at Posit, PBC
Winston Chang is a software engineer at Posit and currently works on Shiny and related projects. He has also worked on several other R packages, including devtools, R6, and ggplot2. Winston is the author of the R Graphics Cookbook, published by O'Reilly Media, and has a PhD in psychology from Northwestern University.