Description Usage Arguments See Also Examples
A toggleable dropdown menu input. Menu inputs may be used as standalone
reactive inputs or within a navInput(). For building custom, more complex
dropdown elements please see dropdown().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
id |
A character string specifying the id of the reactive input. |
label |
A character string or tag element specifying the label of the menu's toggle button. |
choices |
A character vector specifying the choice text of the menu's items. |
values |
A character vector specifying the values of the menu's items,
defaults to |
selected |
One or more of |
... |
Additional named arguments passed as HTML attributes to the parent element or tag elements passed as child elements to the parent element. |
direction |
One of |
align |
One or |
enable |
One of |
disable |
One of |
session |
A reactive context, defaults to |
Other inputs:
buttonGroupInput(),
buttonInput(),
checkbarInput(),
checkboxInput(),
chipInput(),
fileInput(),
formInput(),
listGroupInput(),
navInput(),
radioInput(),
radiobarInput(),
rangeInput(),
selectInput(),
textInput()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ### A simple menu
menuInput(
id = "menu1",
label = "Menu",
choices = c(
"Choice 1",
"Choice 2",
"Choice 3"
)
)
### Use in navigation
navInput(
id = "nav1",
choices = list(
"Tab 1",
menuInput(
id = "navOptions",
label = "Tab 2",
choices = c(
"Option 1",
"Option 2",
"Option 3"
)
),
"Tab 3",
"Tab 4"
),
values = paste0("tab", 1:4)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.