material_radio_button: Create a shinymaterial radio button

Description Usage Arguments See Also Examples

View source: R/shiny-material-radio-button.R

Description

Build a shinymaterial radio button.

Usage

1
2
3
4
5
6
7
8
material_radio_button(
  input_id,
  label,
  choices,
  selected = NULL,
  color = NULL,
  with_gap = FALSE
)

Arguments

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.

See Also

update_material_radio_button

Examples

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

ericrayanderson/shinymaterial documentation built on Oct. 9, 2020, 5:21 p.m.