material_dropdown {shinymaterial}R Documentation

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 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".

See Also

update_material_dropdown

Examples

material_dropdown(
  input_id = "example_dropdown",
  label = "Drop down",
  choices = c(
    "Chicken" = "c",
    "Steak" = "s",
    "Fish" = "f"
  ),
  selected = c("c"),
  multiple = FALSE,
  color = "#ef5350"
)

[Package shinymaterial version 1.2.0 Index]