Description Usage Arguments Value Examples
View source: R/input-selectpicker.R
Create a select picker.
1 2 3 |
inputId |
The |
label |
Display a text in the center of the switch. |
choices |
List of values to select from. If elements of the list are named then that name rather than the value is displayed to the user. |
selected |
The initially selected value (or multiple values if multiple = TRUE). If not specified then defaults to the first value for single-select lists and no values for multiple select lists. |
multiple |
Is selection of multiple items allowed? |
options |
Options to customize the select picker |
choicesOpt |
Options for choices in the dropdown menu |
width |
The width of the input : 'auto', 'fit', '100px', '75%' |
inline |
Put the label and the picker on the same line. |
A select control that can be added to a UI definition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
pickerInput(inputId = "somevalue", label = "A label", choices = c("a", "b")),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderPrint({ input$somevalue })
}
shinyApp(ui, server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.