From the course: Building Data Apps with R and Shiny: Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Applying custom CSS to Shiny apps

Applying custom CSS to Shiny apps

From the course: Building Data Apps with R and Shiny: Essential Training

Start my 1-month free trial

Applying custom CSS to Shiny apps

- [Instructor] All web content is styled using CSS, or Cascading Style Sheets, which include Shiny apps. CSS can be applied inline to specific Shiny elements, for instance, to customize a single select input menu. And we can also style an entire app using the theme argument of fluidPage and navbarPage. It's best practice to always save your CSS into a subfolder called www. Many functions inside of Shiny would look for CSS files relative to the subfolder. Let's see with some practice in our exercise files. We're going to go to folder 09_01 and we're going to open our R studio project. Because we're customizing the look and feel of our Shiny app with CSS, we only need the ui.R file. We don't need to server.R file. Let's open up our script file, and let's run our Shiny app to see what we're dealing with. Okay, so here we have a map of the World. And the selected Continent is shown in red. If I click on this pull-down menu, okay, we can see an error here. So we can see that the zoom…

Contents