View source: R/widget-controls.R
| dropdown | R Documentation |
Shows the selected choice; Enter, Space, Down or a click opens a list
below it. Choosing an option sends "dropdown.changed"
(event$data: value, label); Escape or a click outside closes the
list.
dropdown(
choices,
value = NULL,
prompt = "Select",
id = NULL,
classes = NULL,
style = NULL,
disabled = FALSE
)
choices |
A character vector; names, if present, are shown. |
value |
Initially selected value, or |
prompt |
Text shown when nothing is selected. |
id |
Optional identifier. |
classes |
Optional classes. |
style |
A |
disabled |
Disabled selects cannot be opened. |
Named dropdown() rather than select() so that it does not mask
dplyr::select(); the widget type (for selectors) is Select.
A Select widget with a reactive value.
dropdown(c("Comma separated" = "csv", "JSON" = "json"), value = "csv", id = "format")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.