shinymaterial (version 0.5.3)

material_dropdown: Create a shinymaterial dropdown

Description

Build a shinymaterial dropdown.

Usage

material_dropdown(input_id, label, choices = NULL, selected = NULL,
  multiple = NULL, color = NULL)

Arguments

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 http://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".

Examples

Run this code
# NOT RUN {
material_dropdown(
  input_id = "example_dropdown",
  label = "Drop down",
  choices = c(
    "Chicken" = "c",
    "Steak" = "s",
    "Fish" = "f"
  ),
  selected = c("c"),
  multiple = FALSE,
  color = "#ef5350"
)
# }

Run the code above in your browser using DataCamp Workspace