| ds_radio_group | R Documentation |
Create a reactive group of radio buttons. The value of whichever
ds_radio() is checked is reported to Shiny as a single value via
input[[inputId]] — mirroring how Shiny's own radioButtons() works.
ds_radio_group(
inputId,
label,
choices,
selected = NULL,
size = NULL,
disabled = FALSE,
class = NULL
)
inputId |
Shiny input ID |
label |
The legend text for the group |
choices |
Named vector of choices (names are labels, values are values) |
selected |
Initially selected value. Defaults to the first choice. |
size |
Size variant ("sm", "md", "lg") |
disabled |
If TRUE, disables every radio button in the group |
class |
Additional CSS classes |
A Shiny tag object
ds_radio_group("opts",
label = "Choose one",
choices = c("Choice A" = "a", "Choice B" = "b", "Choice C" = "c"),
selected = "a"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.