material_select: Create a materialize select

Description Usage Arguments Examples

Description

Build a materialize select

Usage

1
2
3
4
5
material_select(inputId, label, choices = NULL, selected = NULL,
  multiple = FALSE, color = NULL)

update_material_select(inputId, choices = NULL, selected = NULL,
  label = NULL, session = shiny::getDefaultReactiveDomain())

Arguments

inputId

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 name of the select input. Leave empty for 'teal lighten-1' color. Visit http://materializecss.com/color.html for a list of available colors.

session

Shiny default reactive domain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
require(materializer)
material_select(
  inputId = "example_dropdown",
  label = "Drop down",
  choices = c(
    "Chicken" = "c",
    "Steak" = "s",
    "Fish" = "f"
  ),
  selected = c("c"),
  multiple = FALSE,
  color = 'teal lighten-1'
)

TuSKan/materializer documentation built on May 17, 2019, 6:35 p.m.