/
fluidPage.Rd
104 lines (90 loc) · 2.73 KB
/
fluidPage.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap-layout.R
\name{fluidPage}
\alias{fluidPage}
\alias{fluidRow}
\title{Create a page with fluid layout}
\usage{
fluidPage(..., title = NULL, responsive = NULL, theme = NULL)
fluidRow(...)
}
\arguments{
\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"}.}
}
\value{
A UI defintion that can be passed to the \link{shinyUI} function.
}
\description{
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.
}
\details{
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}}.
}
\note{
See the \href{http://shiny.rstudio.com/articles/layout-guide.html}{
Shiny-Application-Layout-Guide} for additional details on laying out fluid
pages.
}
\examples{
## Only run examples in interactive R sessions
if (interactive()) {
# Example of UI with fluidPage
ui <- fluidPage(
# Application title
titlePanel("Hello Shiny!"),
sidebarLayout(
# Sidebar with a slider input
sidebarPanel(
sliderInput("obs",
"Number of observations:",
min = 0,
max = 1000,
value = 500)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
)
# Server logic
server <- function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
}
# Complete app with UI and server components
shinyApp(ui, server)
# UI demonstrating column layouts
ui <- fluidPage(
title = "Hello Shiny!",
fluidRow(
column(width = 4,
"4"
),
column(width = 3, offset = 2,
"3 offset 2"
)
)
)
shinyApp(ui, server = function(input, output) { })
}
}
\seealso{
\code{\link{column}}, \code{\link{sidebarLayout}}
}