Description Usage Arguments Examples
The material Dropdown Menu UI Element
1 2 3 4 5 | material_dropdown(inputId, trigger, ddlist, bgcolor = "white",
color = NULL)
update_material_dropdown(inputId, ddlist,
session = shiny::getDefaultReactiveDomain())
|
inputId |
String. The input identifier used to access the value. |
trigger |
tagList. The trigger element for the dropdown. Could be any tagList element, for exemple a'material_button'. |
ddlist |
List. The dropdown element list.The list need to contain a 'target' element and in adition could contain 'name', 'badge' and 'icon' elements. |
bgcolor |
String. The color name for Dropdown backgroud. Leave empty for 'white' color. Visit http://materializecss.com/color.html for a list of available colors. |
color |
String. The color name of the Checkbox. Leave empty for the 'teal lighten-1' color. Visit http://materializecss.com/color.html for a list of available colors. |
session |
Shiny default reactive domain. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require(materializer)
material_dropdown(
inputId = "example_dropdown_menu",
trigger = material_button(
inputId = "example_button",
label = "Drop me",
icon = "arrow_drop_down"
),
ddlist = list(
c(target = "tgt_1", name = "One"),
c(target = "tgt_2", name = "Two"),
NULL,
c(target = "tgt_3", name = "Three", icon = "cloud"),
c(target = "tgt_4", icon = "alarm")
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.