material_switch {shinymaterial} | R Documentation |
Create a shinymaterial switch
Description
Build a shinymaterial switch. The value is a boolean (TRUE if 'on', FALSE if 'off').
Usage
material_switch(
input_id,
off_label = "",
on_label = "",
initial_value = FALSE,
color = NULL
)
Arguments
input_id |
String. The input identifier used to access the value. |
off_label |
String. The label for the 'off' position of the switch. |
on_label |
String. The label for the 'on' position of the switch. |
initial_value |
Boolean. Is the switch initially on? |
color |
String. The color of the switch. 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
Examples
material_switch(
input_id = "example_switch",
off_label = "Off",
on_label = "On",
initial_value = TRUE,
color = "#ef5350"
)
[Package shinymaterial version 1.2.0 Index]