Description Usage Arguments Examples
Build a materialize switch. The value is a boolean (TRUE if 'on', FALSE if 'off').
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())
|
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. |
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'
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.