Learn R Programming

shinyWidgets (version 0.4.3)

panel: Create a panel

Description

Create a panel (box) with basic border and padding, you can use Bootstrap status to style the panel, see http://getbootstrap.com/components/#panels.

Usage

panel(..., heading = NULL, footer = NULL, status = "default")

Arguments

...

UI elements to include inside the panel.

heading

Title for the panel in a plain header.

footer

Footer for the panel.

status

Bootstrap status for contextual alternative.

Value

A UI definition.

Examples

Run this code
# NOT RUN {
if (interactive()) {
library("shiny")
library("shinyWidgets")

ui <- fluidPage(

  # Default
  panel(
    "Content goes here",
    checkboxInput(inputId = "id1", label = "Label")
  ),

  # With header and footer
  panel(
    "Content goes here",
    checkboxInput(inputId = "id2", label = "Label"),
    heading = "My title",
    footer = "Something"
  ),

  # With status
  panel(
    "Content goes here",
    checkboxInput(inputId = "id3", label = "Label"),
    heading = "My title",
    status = "primary"
  )
)

server <- function(input, output, session) {

}

shinyApp(ui = ui, server = server)
}

# }

Run the code above in your browser using DataLab