Debian Codegraph @

man/column.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/bootstrap-layout.R
3 \name{column}
4 \alias{column}
5 \title{Create a column within a UI definition}
6 \usage{
7 column(width, ..., offset = 0)
8 }
9 \arguments{
10 \item{width}{The grid width of the column (must be between 1 and 12)}
11
12 \item{...}{Elements to include within the column}
13
14 \item{offset}{The number of columns to offset this column from the end of the
15 previous column.}
16 }
17 \value{
18 A column that can be included within a
19 \code{\link[=fluidRow]{fluidRow()}} or \code{\link[=fixedRow]{fixedRow()}}.
20 }
21 \description{
22 Create a column for use within a \code{\link[=fluidRow]{fluidRow()}} or
23 \code{\link[=fixedRow]{fixedRow()}}
24 }
25 \examples{
26 ## Only run examples in interactive R sessions
27 if (interactive()) {
28
29 ui <- fluidPage(
30 fluidRow(
31 column(4,
32 sliderInput("obs", "Number of observations:",
33 min = 1, max = 1000, value = 500)
34 ),
35 column(8,
36 plotOutput("distPlot")
37 )
38 )
39 )
40
41 server <- function(input, output) {
42 output$distPlot <- renderPlot({
43 hist(rnorm(input$obs))
44 })
45 }
46
47 shinyApp(ui, server)
48
49
50
51 ui <- fluidPage(
52 fluidRow(
53 column(width = 4,
54 "4"
55 ),
56 column(width = 3, offset = 2,
57 "3 offset 2"
58 )
59 )
60 )
61 shinyApp(ui, server = function(input, output) { })
62 }
63 }
64 \seealso{
65 \code{\link[=fluidRow]{fluidRow()}}, \code{\link[=fixedRow]{fixedRow()}}.
66 }