mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
Merge pull request #2568 from hadley/doc-combine
Document all sidebar UI components together
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bootstrap.R
|
||||
\name{mainPanel}
|
||||
\alias{mainPanel}
|
||||
\title{Create a main panel}
|
||||
\usage{
|
||||
mainPanel(..., width = 8)
|
||||
}
|
||||
\arguments{
|
||||
\item{...}{Output elements to include in the main panel}
|
||||
|
||||
\item{width}{The width of the main panel. For fluid layouts this is out of 12
|
||||
total units; for fixed layouts it is out of whatever the width of the main
|
||||
panel's parent column is.}
|
||||
}
|
||||
\value{
|
||||
A main panel that can be passed to \code{\link[=sidebarLayout]{sidebarLayout()}}.
|
||||
}
|
||||
\description{
|
||||
Create a main panel containing output elements that can in turn be passed to
|
||||
\code{\link[=sidebarLayout]{sidebarLayout()}}.
|
||||
}
|
||||
\examples{
|
||||
# Show the caption and plot of the requested variable against mpg
|
||||
mainPanel(
|
||||
h3(textOutput("caption")),
|
||||
plotOutput("mpgPlot")
|
||||
)
|
||||
}
|
||||
@@ -2,25 +2,38 @@
|
||||
% Please edit documentation in R/bootstrap-layout.R
|
||||
\name{sidebarLayout}
|
||||
\alias{sidebarLayout}
|
||||
\alias{sidebarPanel}
|
||||
\alias{mainPanel}
|
||||
\title{Layout a sidebar and main area}
|
||||
\usage{
|
||||
sidebarLayout(sidebarPanel, mainPanel, position = c("left", "right"),
|
||||
fluid = TRUE)
|
||||
|
||||
sidebarPanel(..., width = 4)
|
||||
|
||||
mainPanel(..., width = 8)
|
||||
}
|
||||
\arguments{
|
||||
\item{sidebarPanel}{The \link{sidebarPanel} containing input controls}
|
||||
\item{sidebarPanel}{The \code{sidebarPanel()} containing input controls.}
|
||||
|
||||
\item{mainPanel}{The \link{mainPanel} containing outputs}
|
||||
\item{mainPanel}{The \code{mainPanel()} containing outputs.}
|
||||
|
||||
\item{position}{The position of the sidebar relative to the main area ("left"
|
||||
or "right")}
|
||||
or "right").}
|
||||
|
||||
\item{fluid}{\code{TRUE} to use fluid layout; \code{FALSE} to use fixed
|
||||
layout.}
|
||||
|
||||
\item{...}{Output elements to include in the sidebar/main panel.}
|
||||
|
||||
\item{width}{The width of the sidebar and main panel. By default, the
|
||||
sidebar takes up 1/3 of the width, and the main panel 2/3. The total
|
||||
width must be 12 or less.}
|
||||
}
|
||||
\description{
|
||||
Create a layout with a sidebar and main area. The sidebar is displayed with a
|
||||
distinct background color and typically contains input controls. The main
|
||||
Create a layout (\code{sidebarLayout()}) with a sidebar (\code{sidebarPanel()}) and
|
||||
main area (\code{mainPanel()}). The sidebar is displayed with a distinct
|
||||
background color and typically contains input controls. The main
|
||||
area occupies 2/3 of the horizontal width and typically contains outputs.
|
||||
}
|
||||
\examples{
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bootstrap.R
|
||||
\name{sidebarPanel}
|
||||
\alias{sidebarPanel}
|
||||
\title{Create a sidebar panel}
|
||||
\usage{
|
||||
sidebarPanel(..., width = 4)
|
||||
}
|
||||
\arguments{
|
||||
\item{...}{UI elements to include on the sidebar}
|
||||
|
||||
\item{width}{The width of the sidebar. For fluid layouts this is out of 12
|
||||
total units; for fixed layouts it is out of whatever the width of the
|
||||
sidebar's parent column is.}
|
||||
}
|
||||
\value{
|
||||
A sidebar that can be passed to \code{\link[=sidebarLayout]{sidebarLayout()}}
|
||||
}
|
||||
\description{
|
||||
Create a sidebar panel containing input controls that can in turn be passed
|
||||
to \code{\link[=sidebarLayout]{sidebarLayout()}}.
|
||||
}
|
||||
\examples{
|
||||
# Sidebar with controls to select a dataset and specify
|
||||
# the number of observations to view
|
||||
sidebarPanel(
|
||||
selectInput("dataset", "Choose a dataset:",
|
||||
choices = c("rock", "pressure", "cars")),
|
||||
|
||||
numericInput("obs", "Observations:", 10)
|
||||
)
|
||||
}
|
||||
@@ -22,7 +22,8 @@ valid when using a \code{tabPanel} within a \code{\link[=navbarPage]{navbarPage(
|
||||
A tab that can be passed to \code{\link[=tabsetPanel]{tabsetPanel()}}
|
||||
}
|
||||
\description{
|
||||
Create a tab panel that can be included within a \code{\link[=tabsetPanel]{tabsetPanel()}}.
|
||||
Create a tab panel that can be included within a \code{\link[=tabsetPanel]{tabsetPanel()}} or
|
||||
a \code{\link[=navbarPage]{navbarPage()}}.
|
||||
}
|
||||
\examples{
|
||||
# Show a tabset that includes a plot, summary, and
|
||||
|
||||
Reference in New Issue
Block a user