Description Usage Arguments See Also Examples
View source: R/shiny-material-dropdown.R
Build a shinymaterial dropdown.
1 2 3 4 5 6 7 8 | material_dropdown(
input_id,
label,
choices = NULL,
selected = NULL,
multiple = NULL,
color = NULL
)
|
input_id |
String. The input identifier used to access the value. |
label |
String. The dropdown label. |
choices |
Named vector. The option names and underyling values. |
selected |
String. The initially selected underyling value. |
multiple |
Boolean. Can multiple items be selected? |
color |
String. The color of the dropdown choices. Leave empty for the default color. Visit https://materializecss.com/color.html for a list of available colors. This input requires using color hex codes, rather than the word form. E.g., "#ef5350", rather than "red lighten-1". |
1 2 3 4 5 6 7 8 9 10 11 12 | material_dropdown(
input_id = "example_dropdown",
label = "Drop down",
choices = c(
"Chicken" = "c",
"Steak" = "s",
"Fish" = "f"
),
selected = c("c"),
multiple = FALSE,
color = "#ef5350"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.