material_dropdown: The material Dropdown Menu UI Element

Description Usage Arguments Examples

Description

The material Dropdown Menu UI Element

Usage

1
2
3
4
5
material_dropdown(inputId, trigger, ddlist, bgcolor = "white",
  color = NULL)

update_material_dropdown(inputId, ddlist,
  session = shiny::getDefaultReactiveDomain())

Arguments

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.

Examples

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

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