material_switch: Create a materialize switch

Description Usage Arguments Examples

Description

Build a materialize switch. The value is a boolean (TRUE if 'on', FALSE if 'off').

Usage

1
2
3
4
5
material_switch(inputId, on = "On", off = "Off", value = FALSE,
  disabled = FALSE, color = NULL)

update_material_switch(inputId, on = NULL, off = NULL, value = NULL,
  disabled = NULL, session = shiny::getDefaultReactiveDomain())

Arguments

inputId

String. The input identifier used to access the value.

on

String. The label for the 'on' position of the switch.

off

String. The label for the 'off' position of the switch.

value

Boolean. Is the switch initially on?

disabled

String. The radio button should be disabled?

color

String. The color name of the Switch. 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
require(materializer)
material_switch(
  inputId = "example_switch",
  off = "Off",
  on = "On",
  value = TRUE,
  color = 'teal lighten-1'
)

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