Learn R Programming

gentelellaShiny (version 0.1.0)

boxWidget: A box widget container

Description

A box widget container

Usage

boxWidget(..., title = NULL, width = NULL)

Arguments

...

slot for any widget

title

widget title

width

widget width

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(gentelellaShiny)
 shinyApp(
  ui = gentelellaPageCustom(
   gentelellaBody(
    box(
     width = 6,
     title = "Box Widget",
     fluidRow(
      column(
       width = 3,
       align = "center",
       sliderInput(
        "obs",
        "Number of observations:",
        min = 0,
        max = 1000,
        value = 500
       )
      ),
      column(
       width = 9,
       boxWidget(
        title = "Widget",
        plotOutput("distPlot")
       )
      )
     )
    )
   )
  ),
  server <- function(input, output) {
   output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
   })
  }
 )
}

# }

Run the code above in your browser using DataLab