1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/bootstrap-layout.R 3\name{fluidPage} 4\alias{fluidPage} 5\alias{fluidRow} 6\title{Create a page with fluid layout} 7\usage{ 8fluidPage(..., title = NULL, theme = NULL, lang = NULL) 9 10fluidRow(...) 11} 12\arguments{ 13\item{...}{Elements to include within the page} 14 15\item{title}{The browser window title (defaults to the host URL of the page). 16Can also be set as a side effect of the \code{\link[=titlePanel]{titlePanel()}} function.} 17 18\item{theme}{One of the following: 19\itemize{ 20\item \code{NULL} (the default), which implies a "stock" build of Bootstrap 3. 21\item A \code{\link[bslib:bs_theme]{bslib::bs_theme()}} object. This can be used to replace a stock 22build of Bootstrap 3 with a customized version of Bootstrap 3 or higher. 23\item A character string pointing to an alternative Bootstrap stylesheet 24(normally a css file within the www directory, e.g. \code{www/bootstrap.css}). 25}} 26 27\item{lang}{ISO 639-1 language code for the HTML page, such as "en" or "ko". 28This will be used as the lang in the \code{<html>} tag, as in \code{<html lang="en">}. 29The default (NULL) results in an empty string.} 30} 31\value{ 32A UI defintion that can be passed to the \link{shinyUI} function. 33} 34\description{ 35Functions for creating fluid page layouts. A fluid page layout consists of 36rows which in turn include columns. Rows exist for the purpose of making sure 37their elements appear on the same line (if the browser has adequate width). 38Columns exist for the purpose of defining how much horizontal space within a 3912-unit wide grid it's elements should occupy. Fluid pages scale their 40components in realtime to fill all available browser width. 41} 42\details{ 43To create a fluid page use the \code{fluidPage} function and include 44instances of \code{fluidRow} and \code{\link[=column]{column()}} within it. As an 45alternative to low-level row and column functions you can also use 46higher-level layout functions like \code{\link[=sidebarLayout]{sidebarLayout()}}. 47} 48\note{ 49See the \href{https://shiny.rstudio.com/articles/layout-guide.html}{ Shiny-Application-Layout-Guide} for additional details on laying out fluid 50pages. 51} 52\examples{ 53## Only run examples in interactive R sessions 54if (interactive()) { 55 56# Example of UI with fluidPage 57ui <- fluidPage( 58 59 # Application title 60 titlePanel("Hello Shiny!"), 61 62 sidebarLayout( 63 64 # Sidebar with a slider input 65 sidebarPanel( 66 sliderInput("obs", 67 "Number of observations:", 68 min = 0, 69 max = 1000, 70 value = 500) 71 ), 72 73 # Show a plot of the generated distribution 74 mainPanel( 75 plotOutput("distPlot") 76 ) 77 ) 78) 79 80# Server logic 81server <- function(input, output) { 82 output$distPlot <- renderPlot({ 83 hist(rnorm(input$obs)) 84 }) 85} 86 87# Complete app with UI and server components 88shinyApp(ui, server) 89 90 91# UI demonstrating column layouts 92ui <- fluidPage( 93 title = "Hello Shiny!", 94 fluidRow( 95 column(width = 4, 96 "4" 97 ), 98 column(width = 3, offset = 2, 99 "3 offset 2" 100 ) 101 ) 102) 103 104shinyApp(ui, server = function(input, output) { }) 105} 106} 107\seealso{ 108\code{\link[=column]{column()}} 109 110Other layout functions: 111\code{\link{fillPage}()}, 112\code{\link{fixedPage}()}, 113\code{\link{flowLayout}()}, 114\code{\link{navbarPage}()}, 115\code{\link{sidebarLayout}()}, 116\code{\link{splitLayout}()}, 117\code{\link{verticalLayout}()} 118} 119\concept{layout functions} 120