Description Usage Arguments See Also Examples
View source: R/shiny-material-radio-button.R
Build a shinymaterial radio button.
1 2 3 4 5 6 7 8 | material_radio_button(
input_id,
label,
choices,
selected = NULL,
color = NULL,
with_gap = FALSE
)
|
input_id |
String. The input identifier used to access the value. |
label |
String. The radio button label. |
choices |
Named vector. The option names and underyling values. |
selected |
The initially selected value (if not specified then defaults to the first value). |
color |
String. The color of the radio buttons. 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". |
with_gap |
Boolean. To create a radio button with a gap. |
1 2 3 4 5 6 7 8 9 10 | material_radio_button(
input_id = "example_radio_button",
label = "Radio Button",
choices = c(
"Cake" = "c",
"Pie" = "p",
"Brownie" = "b"
),
color = "#ef5350"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.