Producing layout in rows and columns
As we already know, Shiny uses the grid system from Bootstrap to lay out content. There are a couple of ways to carry this out, but built-in Shiny functions are always involved. The differences between the functions are minor and the basic idea of each is the same.
This section will cover the server installation steps of the following functions:
fluidPage()
bootstrapPage()
fixedPage()
fluidPage()
The most standard way of using the grid layout within Shiny is to use the fluidPage()
function. The following code snippet illustrates the fluidPage()
function:
server = function(input, output){ # server code } ui = fluidPage( fluidRow( column(2, wellPanel(p("Column width 2"))), column(10, wellPanel(p("Column width 10")))), fluidRow( column(4, wellPanel(p("Column width 4"))), column(4, wellPanel(p("Column width 4"))), column(4, wellPanel(p("Column width 4")))) ) shinyApp(ui = ui, server = server)
From the preceding code, the content of this...