Fetching contributors…
Cannot retrieve contributors at this time
105 lines (90 sloc) 2.73 KB
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap-layout.R
\title{Create a page with fluid layout}
fluidPage(..., title = NULL, responsive = NULL, theme = NULL)
\item{...}{Elements to include within the page}
\item{title}{The browser window title (defaults to the host URL of the page).
Can also be set as a side effect of the \code{\link{titlePanel}} function.}
\item{responsive}{This option is deprecated; it is no longer optional with
Bootstrap 3.}
\item{theme}{Alternative Bootstrap stylesheet (normally a css file within the
www directory). For example, to use the theme located at
\code{www/bootstrap.css} you would use \code{theme = "bootstrap.css"}.}
A UI defintion that can be passed to the \link{shinyUI} function.
Functions for creating fluid page layouts. A fluid page layout consists of
rows which in turn include columns. Rows exist for the purpose of making sure
their elements appear on the same line (if the browser has adequate width).
Columns exist for the purpose of defining how much horizontal space within a
12-unit wide grid it's elements should occupy. Fluid pages scale their
components in realtime to fill all available browser width.
To create a fluid page use the \code{fluidPage} function and include
instances of \code{fluidRow} and \code{\link{column}} within it. As an
alternative to low-level row and column functions you can also use
higher-level layout functions like \code{\link{sidebarLayout}}.
See the \href{}{
Shiny-Application-Layout-Guide} for additional details on laying out fluid
## Only run examples in interactive R sessions
if (interactive()) {
# Example of UI with fluidPage
ui <- fluidPage(
# Application title
titlePanel("Hello Shiny!"),
# Sidebar with a slider input
"Number of observations:",
min = 0,
max = 1000,
value = 500)
# Show a plot of the generated distribution
# Server logic
server <- function(input, output) {
output$distPlot <- renderPlot({
# Complete app with UI and server components
shinyApp(ui, server)
# UI demonstrating column layouts
ui <- fluidPage(
title = "Hello Shiny!",
column(width = 4,
column(width = 3, offset = 2,
"3 offset 2"
shinyApp(ui, server = function(input, output) { })
\code{\link{column}}, \code{\link{sidebarLayout}}