dropInput {esquisse} | R Documentation |
Dropdown Input
Description
A dropdown menu for selecting a value.
Usage
dropInput(
inputId,
choicesNames,
choicesValues,
selected = NULL,
dropUp = FALSE,
dropWidth = NULL,
dropMaxHeight = NULL,
dropPreScrollable = FALSE,
btnClass = "btn-link",
width = NULL
)
Arguments
inputId |
The |
choicesNames |
A |
choicesValues |
Vector corresponding to |
selected |
The initial selected value, must be an element of |
dropUp |
Open the menu above the button rather than below. |
dropWidth |
Width of the dropdown menu. |
dropMaxHeight |
Maximal height for the menu. |
dropPreScrollable |
Force scroll bar to appear in the menu. |
btnClass |
Class for buttons in dropdown menu, default is |
width |
The width of the input. |
See Also
Examples
if (interactive()) {
library(shiny)
library(esquisse)
ui <- fluidPage(
tags$h2("Drop Input"),
dropInput(
inputId = "mydrop",
choicesNames = tagList(
list(icon("home"), style = "width: 100px;"),
list(icon("flash"), style = "width: 100px;"),
list(icon("cogs"), style = "width: 100px;"),
list(icon("fire"), style = "width: 100px;"),
list(icon("users"), style = "width: 100px;"),
list(icon("info"), style = "width: 100px;")
),
choicesValues = c("home", "flash", "cogs",
"fire", "users", "info"),
dropWidth = "220px"
),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$res <- renderPrint({
input$mydrop
})
}
shinyApp(ui, server)
}
[Package esquisse version 2.0.0 Index]