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):
To install the latest version of shinythemes, run:
To use the theme selector, all you need to do is add this somewhere in your app’s UI code:
Once you’ve chosen which theme you want, all you need to do is use the
theme argument of the
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!